Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
My question is simple yet I can not find any good help with this problem. I have set a color based on a rule that makes it either green when the value is above 13,000 and red if it is below that. This all works fine but I need to get the number from a parameter instead of a hardcoded 13,000. Is this possible and if so how would I achieve that?
Thanks in advance,
Jalen
Image describing problem:
Solved! Go to Solution.
@jalenm ,
You can create a measure, There you can use a whatif parameter measure or a meausre
Example
Meausre = Switch( True() ,
[Bedrag Running Total Bedrag] < [What if] , "Red",
[Bedrag Running Total Bedrag] < [What if 2] , "Green" )
Use this in conditional formatting using field value option
You can also use min and max value of what if
new measure =
var _max = maxx(allselected(whatif),whatif[value])
var _min = minx(allselected(whatif),whatif[value])
return
Switch( True() ,
[Bedrag Running Total Bedrag] <_min , "Red",
[Bedrag Running Total Bedrag] < _max , "Green" )
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Hello @jalenm !
The thought here is that if you hard code a value, it can never change, thus never change color.
Therefore you are supposed to enter the field where you get this number that is supposed to change color from.
For example if you want it to change if the SUM of a value is over/under 13000, enter the measure which contains the sum of the value in to the field.
My bad for not being clear enough. I don't want to change the number that the field is based on (That bedrag running total is correct and it already works properly) But I want the user to be able to choose an amount with a slicer parameter. Then the value they have selected should replace the 13,000 number from the image. The 13,000 number I put there is just a placeholder but it should be a dynamic number from the parameter.
@jalenm ,
You can create a measure, There you can use a whatif parameter measure or a meausre
Example
Meausre = Switch( True() ,
[Bedrag Running Total Bedrag] < [What if] , "Red",
[Bedrag Running Total Bedrag] < [What if 2] , "Green" )
Use this in conditional formatting using field value option
You can also use min and max value of what if
new measure =
var _max = maxx(allselected(whatif),whatif[value])
var _min = minx(allselected(whatif),whatif[value])
return
Switch( True() ,
[Bedrag Running Total Bedrag] <_min , "Red",
[Bedrag Running Total Bedrag] < _max , "Green" )
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Thank you so much! Honestly I probably would have never thought of that solution.
User | Count |
---|---|
124 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |