Forum Discussion
IF three condition.
- Anonymous9 years ago
Hi JazminMarquez,
I am not sure what is your sample data, but you can check if the following steps return your expected result.
1. Create a new table using the following formula.
image = UNION ( ROW ( "state", "Green", "ImgURL", "https://cdn.pixabay.com/photo/2013/07/13/10/27/hand-157251_960_720.png" ), ROW ( "state", "Red", "ImgURL", "http://www.clker.com/cliparts/5/2/5/8/13476359851958638477thumbs-down-icon-red-hi-hi.png" ), ROW ( "state", "yellow", "ImgURL", "http://www.clker.com/cliparts/l/J/Q/d/1/X/yellow-thumbs-up-md.png" ) )
2. Create a new measure using the following formula.LinkedMeasure = SUMX ( VALUES ( 'image '[state] ), IF ( ( [Totalutility%]>= 0 && [Totalutility%] <= 0.84 && VALUES ( 'image '[state] ) ="Green" ) || ( [Totalutility%] >= 0.85 && [Totalutility%] <= 0.99 && VALUES ( 'image '[state] ) = "Red" ) || ( [Totalutility%] >=1 && VALUES ( 'image '[state] ) = "yellow" ), 1 ) )3. Display image in ChicletSlicer. Image will change based on the value of [Totalutility%] Measure.
Reference:
http://sqljason.com/2015/11/custom-indicators-in-power-bi-using.htmlThanks,
Lydia Zhang
We can overcome that by creating a dynamic table that is based on two other tables.
It's a little more complex but can be done. It would help to see your two tables so we can generate the formula you need.
Thx for the help guys..
Any questions you have, please let me know. I am very grateful to take the time to help me, but I can not get this far
- JazminMarquez9 years agoFrequent Visitor
Lydia Zhang,
I am very grateful for your response and above all for taking the time to help me, I have solved this issue. :smileyvery-happy:
- JazminMarquez9 years agoFrequent Visitor
I finally found the way that the image works, now I can not make it work with 3 images ..
Value = SUMX( VALUES(Images[State]), SWITCH(Images[State], "ThumbsMedium", IF([TotalUtility]>= .85,1,0), IF([TotalUtility]>= .85,0,1)))
- Anonymous9 years agoNot applicable
Hi JazminMarquez,
I am not sure what is your sample data, but you can check if the following steps return your expected result.
1. Create a new table using the following formula.
image = UNION ( ROW ( "state", "Green", "ImgURL", "https://cdn.pixabay.com/photo/2013/07/13/10/27/hand-157251_960_720.png" ), ROW ( "state", "Red", "ImgURL", "http://www.clker.com/cliparts/5/2/5/8/13476359851958638477thumbs-down-icon-red-hi-hi.png" ), ROW ( "state", "yellow", "ImgURL", "http://www.clker.com/cliparts/l/J/Q/d/1/X/yellow-thumbs-up-md.png" ) )
2. Create a new measure using the following formula.LinkedMeasure = SUMX ( VALUES ( 'image '[state] ), IF ( ( [Totalutility%]>= 0 && [Totalutility%] <= 0.84 && VALUES ( 'image '[state] ) ="Green" ) || ( [Totalutility%] >= 0.85 && [Totalutility%] <= 0.99 && VALUES ( 'image '[state] ) = "Red" ) || ( [Totalutility%] >=1 && VALUES ( 'image '[state] ) = "yellow" ), 1 ) )3. Display image in ChicletSlicer. Image will change based on the value of [Totalutility%] Measure.
Reference:
http://sqljason.com/2015/11/custom-indicators-in-power-bi-using.htmlThanks,
Lydia Zhang