Forum Discussion
Conditional Formatting with % and criteria
- 1 year ago
Hi Anonymous
Create a measure in your table and use that for formatting:
Colour measure =var ser = sum('Table'[Service level]) --if this is a measure just put the measure namevar lob = selectedValue('Table'[LOBs])RETURNSwitch(True(), ser > 0.7 || ser > 0.55 && lob IN {"A","B"} || lob = "D" && ser > 60,"Green", ser > 0.6 || ser > 0.50 && lob IN {"A","B"} || lob = "D" && ser > 50,"Yellow", ser > 0.5 || ser > 0.45 && lob IN {"A","B"} || lob = "D" && ser > 40,"Red","Blue")Then assign this to your field formatting:
- 1 year ago
(lob = "D" || si in {"d(I)",d(ii)}) && ser > 60
Need the brackets so they happen at the same time.
Assuming its Lob = D OR Si = "d(i)" if it is AND use &&
Hi Anonymous
Create a measure in your table and use that for formatting:
Then assign this to your field formatting:
Hi SamWiseOwl
I also need to add two more conditions which is in different columns .
Can you tell what should i modify in this?
Thanks,
Ashish
- SamWiseOwl1 year agoSuper UserColour measure =var ser = sum('Table'[Service level]) --if this is a measure just put the measure namevar lob = selectedValue('Table'[LOBs])var si = selectedValue('Table'[Si's])RETURNSwitch(True(), ser > 0.7 || ser > 0.55 && (lob IN {"A","B"} || si IN {"a(i)","b(i)"}) || lob = "D" && ser > 60,"Green", ser > 0.6 || ser > 0.50 && (lob IN {"A","B"} || si IN {"a(i)","b(i)"}) || lob = "D" && ser > 50,"Yellow", ser > 0.5 || ser > 0.45 && (lob IN {"A","B"} || si IN {"a(i)","b(i)"}) || lob = "D" && ser > 40,"Red","Blue")
- Anonymous1 year agoNot applicable
Thank you SamWiseOwl
Just forget to add D aslo has SI level d(i) and d(II) . So can i add like this ;ser > 0.7 || ser > 0.55 && (lob IN {"A","B"} || si IN {"a(i)","a(i)"}) || lob = "D" && si in {"d(I)",d(ii)} && ser > 60,"Green"
and SO on ??- SamWiseOwl1 year agoSuper User
(lob = "D" || si in {"d(I)",d(ii)}) && ser > 60
Need the brackets so they happen at the same time.
Assuming its Lob = D OR Si = "d(i)" if it is AND use &&