Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dear All,
I want to come up with a 100% stacked bar chart view as in the attached screenshot.
Can anybody suggest what is the most efficient way of doing it?
Data structure provided on the left of the visual.
Thanks for any help in this topic.
Kind Regards,
Adarsh
Solved! Go to Solution.
Hi @Anonymous ,
Do you have any specific column that you use as ID? If yes I would split your model in two table one with all the Portfolio information that you will not unpivot and delete all the columns A to I and a second table that would be the ID column and the unpivot of the A to I columns then linked both tables by the ID column.
To calculate the status you would use the 2nd table and for the rest of the setup the other table.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
You could refer to above suggestions, choose all columns in Edit Queries->unpivot columns, then use meausre to get it or use M code to get count. You could refer to my sample for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dear @dax, thanks a lot for your additional input. But what could I do in cases where there are additional columns and I have to use filter?
Hi @Anonymous ,
On the query Editor select columns A to I and unpivoted then you will get two columns with attribute (A to J) and Value (status)
Now create a 100% stacked bar with the following layout:
Should give expected result.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks a lot @MFelix for this elegant solution.
I have follow up question to this solution. My database has couple of other columns, and when I unpivot these selected columns within the table a lot of extra rows are created. Also I wanted to filter based on the column in the sheet? How can I do that?
Hi @Anonymous ,
Making the unpivot of columns what you do is to create lines instead of columns, so this will increase the number of rows and the data from the other columns that are not unpivot will be duplicated as many time as columns you have. Be aware that depending on the type of information you have associated with your data you may need to have measures or calculation done in a different way so that the information is not multiplied by the many row you have.
When you are refering to filter by a column what do you mean, I cannot see any filter column on the image.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MFelix ,
Sorry for not providing the entire data set.
For example I have a Portfolio column here, i want to use this as a filter.
Also, each record represents an application. Unpivoting increases the number of these records and I get a wrong count.
Is there any other way of getting this done?
Kind Regards,
Adarsh
Hi @Anonymous ,
Do you have any specific column that you use as ID? If yes I would split your model in two table one with all the Portfolio information that you will not unpivot and delete all the columns A to I and a second table that would be the ID column and the unpivot of the A to I columns then linked both tables by the ID column.
To calculate the status you would use the 2nd table and for the rest of the setup the other table.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks a lot for this. Now i can get the exact visual I wanted.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
118 | |
82 | |
47 | |
42 | |
33 |
User | Count |
---|---|
186 | |
80 | |
72 | |
48 | |
45 |