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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors