Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
earthling
Frequent Visitor

How can I aggregate and display separate columns containing similar data into a single chart?

I have data that displays 'Learning Outcomes'  in individual columns:

earthling_0-1653682736299.png

There are a total of 9 outcomes to which I need to be able to display their total counts in a stacked bar chart (with learning outcome on x-axis, count on y), however, since they are all seperate columns I am having difficulty because you cannot have multiple individual x-axis.

 

Does there exist a solution/alternative/specific function to aggregate the 9 columns into 'one' - or at least be able to show the distribution among them in a single chart?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @earthling ,

 

In Power Query Editor, select 9 columns and use Unpivot feature.

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882... 

Or in Power BI Desktop, create a new table by using below dax formula:

Table 2 = union(
SELECTCOLUMNS('Table',"append",'Table'[Column1]),
SELECTCOLUMNS('Table',"append",'Table'[Column2]),
SELECTCOLUMNS('Table',"append",'Table'[Column3]),
...)

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @earthling ,

 

In Power Query Editor, select 9 columns and use Unpivot feature.

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882... 

Or in Power BI Desktop, create a new table by using below dax formula:

Table 2 = union(
SELECTCOLUMNS('Table',"append",'Table'[Column1]),
SELECTCOLUMNS('Table',"append",'Table'[Column2]),
SELECTCOLUMNS('Table',"append",'Table'[Column3]),
...)

 

Best Regards,

Jay

Fowmy
Super User
Super User

@earthling 

You can apply the UnPivot function in Powr Query to achieve the excpected results.
Please refer to these video to learn how: https://youtube.com/playlist?list=PL17mrTZhD0ZpyjSCZdLQx-0h3hmTRD9hR

If you create and pate a dummy dataset in your reply with the expected result, I will be able to show you how.
 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.