Forum Discussion
Using parameters to set pass/fail mark
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:
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
3 Replies
- amitchandakSuper User
Are you looking for whatif
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Also, consider unpivoting your data
- parry2kSuper User
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.
- v-chuncz-msftCommunity Support
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