The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have data that displays 'Learning Outcomes' in individual columns:
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?
Solved! Go to Solution.
Hi @earthling ,
In Power Query Editor, select 9 columns and use Unpivot feature.
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
Hi @earthling ,
In Power Query Editor, select 9 columns and use Unpivot feature.
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
@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.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
77 | |
77 | |
36 | |
30 | |
28 |
User | Count |
---|---|
106 | |
97 | |
55 | |
49 | |
46 |