Forum Discussion
dokat
2 years agoPost Prodigy
Dax If statement not working correctly.
Hi, I have below dax code i'd like it change background color of the shape to red (rgba(255, 255, 255, 1)) when "Last Month" is selected in slicer or else transperant background color rgba(255, ...
- 2 years ago
v-yanimei-msft
Power BI accepts "rgba(255,255,255,0)", as you can see in the below image. I created two measures, [measure 2]and [measure 3] and used them in the background color for the shapes. And if you you observe both are working as per the conditionMeasure 3 = if (10<1, "rgba(255,255,255,1)","rgba(255,255,255,0)") Measure 2 = if (10>1, "rgba(255,255,255,1)","rgba(255,255,255,0)")
tharunkumarRTK
2 years agoSuper User
dokat
Did you validate your if statement? I would suggest you to put this measure in a card visual and change the selection in the slicer and validate it. If you measure is working as per your expection then please try to share pbix file for futher testing.
If the post helps please give a thumbs up
If it solves your issue, please accept it as the solution to help the other members find it more quickly.
Tharun