Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have the following example data:
| Name | Cat1 | Cat2 | Cat3 | Avg |
| Ewan | 4 | 4 | 2 | 3.33 |
| James | 2 | 3 | 3 | 2.67 |
| Nick | 3 | 0 | 1 | 1.33 |
| Tim | 1 | 5 | 0 | 2.33 |
| William | 5 | 5 | 5 | 5 |
| Jack | 0 | 1 | 2 | 2.33 |
I am new to Power BI so am struggling to build exactly what I would have built in Tableau. I want to be able to specify a "Threshold score", eg a value between 0 and 5 (intervals of 1). I would then like to create a 100% Stacked Bar or Pie Chart which shows the number of names which are above/equal to the threshold value vs the names that are below the threshold value for each category. The user could then be able to use the parameter slider and alter the value and as they do this, the graphs would update.
In my head, it should be simply:
IF (Cat1 >= Parameter, "Pass", "Fail")
Then set that as the legend on a Pie/Bar chart so (if the threshold value was 2 for example) we could produce the following:
Solved! Go to Solution.
You may take a look at the post below.
https://community.powerbi.com/t5/Desktop/Create-a-bar-graph-with-measures-as-axis/td-p/455900
You may take a look at the post below.
https://community.powerbi.com/t5/Desktop/Create-a-bar-graph-with-measures-as-axis/td-p/455900
Are you looking for whatif
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Also, consider unpivoting your data
@amitchandak I don't think it is whatif issue, whatif is just one part of it, @ejhh12 needs to create a pass/fail values based on parameter so that he can use that in legend.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |