Column chart from pivoted table

Viewed 26

I need some help with the next problem, I'm new at Power BI btw. I have next data structure:

data_table

So, I need to get a visualization per year and separated by [app,repp], something like this:

Example

But, in the same visual I need to get separated by years, I mean 2020[app, repp], 2021[app, repp] and 2022[app, repp]. I will appreciate your help.

1 Answers

The problem is your Excel pivot table, which is intuitive to read, but bad for visualizations. You'll have to unpivot it first using PowerQuery:

enter image description here

With

Table.UnpivotOtherColumns(Source, {"Student"}, "Year", "Status")

you'll get

enter image description here

From here it's straight forward to build a clustered column chart with

  • X-axis: Year
  • Y-axis: Count of Student
  • Lengend: Status

enter image description here

You could also swap X-axis amd Legend to get something like this:

enter image description here

Related