Forum Discussion
Conditional colour formatting
Is it possible to create a conditional colour format based on % difference from a target value to change the background colour of a card visual?
For example if a value is 50% higher than target show dark green? So, if the target is 100 and actual is 200 then dark green etc?
Would that be achieved using rules or field value?
Hi Fusilier
Create a measure similar to below:
VAR _target = [target measure or target value] VAR _actual = [actual measure] VAR _diff = _actual - _target VAR _pct = DIVIDE ( _diff, _target ) RETURN SWITCH ( TRUE (), _pct > 0.5, "green", "red" )Use this to conditionally format a card's background using field value
8 Replies
- danextianSuper User
Hi Fusilier
Create a measure similar to below:
VAR _target = [target measure or target value] VAR _actual = [actual measure] VAR _diff = _actual - _target VAR _pct = DIVIDE ( _diff, _target ) RETURN SWITCH ( TRUE (), _pct > 0.5, "green", "red" )Use this to conditionally format a card's background using field value
- Syndicate_AdminAdministrator
Good afternoon, I hope you are well,
If I misunderstood, here's what you need
Video Help = Bing Videos
Measurements = 📊 Visual Pro Card: From Simple to Sensational in Just 4-5 Minutes - Google DocsI hope it serves you,
Best regards
- FusilierHelper III
Sorry, I don;'t understand Spanish. Thanks anyway.
- Syndicate_AdminAdministrator
Oh, sorry
Check out this tutorial, it's in English
Bing VÃdeos