Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi everyone,
I have a data set in the following format:
Main Equipment | Sub Equipment | Sub-Sub Equipment |
E1 | S1 | SS1 |
E1 | S1 | SS1 |
E2 | S2 | SS2 |
E2 | S3 | SS4 |
I want to convert it to the following format and make a bar chart for it.
Equipment Level | Count |
Main Equipment | 2 |
Sub Equipment | 3 |
Sub-Sub Equipment | 3 |
If I use matrix and transpose the rows and then, use count(distinct), I can make the following plot. The issue is that it doesn't show the name of equipment level on X-xis:
Following imaginary output is what I look for:
Please consider that there are other visuals build based on this data set and I can't change the format of the data set in the Power Query.
Thanks.
Solved! Go to Solution.
Hi @Anonymous ,
You can just duplicate your data source and transform the data like how @HashamNiaz said.
Then use this new dataset for your visual.
As you are dupicating the dataset, you will have it dynamic as well as you don't have to hard code.
As the dataset is the duplicte of the original dataset, once the orginal dataset updates, this too gets refreshed with the latest data
Hope this helps!!
Hi @Anonymous ,
You can just duplicate your data source and transform the data like how @HashamNiaz said.
Then use this new dataset for your visual.
As you are dupicating the dataset, you will have it dynamic as well as you don't have to hard code.
As the dataset is the duplicte of the original dataset, once the orginal dataset updates, this too gets refreshed with the latest data
Hope this helps!!
Hi @Jihwan_Kim
I can't do it. It's a sort of hard coding:)
We can't create one table per each request as these tables will be added to our model and it's not a best practice to do so. More importantly, I want to use this visualisation as the first level of a drill-down scenario, so it should be related to other dimensions which I have.
Hi @Anonymous !
You can simply go to Power Query editor (Transform Data), select the all 3 column and perform Unpivot Transformation.
Relabel the column name, now in your report simply plot the chart against your category & distinct count.
Regards,
Hasham
Thanks for your reply but I can't reshape the data set format for this request. There are other visuals using this data set in the original format.
Hi, @Anonymous
I assume you can manually create one more axis table inside Power BI like below.
Please check the below picture and the sample pbix file's link down below.
all measures are in the sample pbix file.
In this case, I used explicit measures, not implicit measures.
https://www.dropbox.com/s/3nzqvl9ggjagz96/tooba.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
86 | |
82 | |
70 | |
49 |
User | Count |
---|---|
143 | |
125 | |
108 | |
60 | |
55 |