Forum Discussion
colour formating
- Anonymous6 years ago
When you have clicked on the conditional formatting then you should be able to change the format by to field value and then select your measure as the field like below.
If this works then please mark it as the accepted solution.
If I understand your issue correctly then I would create a measure like the one below:
formatting =
IF(
SELECTEDVALUE( Dim[Check]) = "LB";
IF( // For LB
[target] > [Perfo];
"Green";
"Red"
);
IF( // For HB
[target] < [Perfo];
"Green";
"Red"
)
)And then I would make some conditional formatting --> Based on field --> [formatting]
If this works then please mark it as the accepted solution.
- unnijoy6 years agoPost Prodigy
Thanks for your reply, the table that i keept as referrence is not part of my data base. It is just for referrence. I need the dax baed on the first table. somthing like if(and([parameter]="Ab"),Perfo<=avg[target]),"Green","Red") so it should be like nexted if. But in Power bi it is tough for make somthing like this. Can you help based on this.
- Anonymous6 years agoNot applicable
I would make the table a part of you datamodel to make the most efficient measure.
But I guess you can make something like the measure below:
formatting = SWITCH( SELECTEDVALUE(Parameter), "AB", IF( [Perfo] <= [Target], "Green", "Red"), "ATT", IF( [Perfo] <= [Target], "Green", "Red"), "ESAT", IF( [Perfo] > [Target], "Green", "Red"), ETC... "Black" )
- unnijoy6 years agoPost Prodigy
Hi Anonymous , this is working. But when i try to use this measue for condetionakl formating the measure is not getting selected. Am i missing somthing. Please advice.