Forum Discussion
Conditiional formatting on calculated columns
Hi
I have created two different meassuers
#1
KPI_3_1_Budget =
if('BUDGET_COMMITMENTS (2)'[ACCOUNT] >= 3000,
f('BUDGET_COMMITMENTS (2)'[ACCOUNT] <= 7999,
if('BUDGET_COMMITMENTS (2)'[CODE_B] = 430,
IF(
'BUDGET_COMMITMENTS (2)'[BUDGET_VERSION]="B",
IF(
'BUDGET_COMMITMENTS (2)'[SIMULATION_VOUCHER]="FALSE",
'BUDGET_COMMITMENTS (2)'[BUDGET_AMOUNT],0)))))
#2
KPI_3_4_Real =
if('BUDGET_COMMITMENTS (2)'[ACCOUNT] >= 3000,
if('BUDGET_COMMITMENTS (2)'[ACCOUNT] <= 7999,
if('BUDGET_COMMITMENTS (2)'[CODE_B] = 430,
'BUDGET_COMMITMENTS (2)'[AMOUNT_BALANCE],
0)))
This all works just fine and I want my visual to look like the on below
| Month | Real | Budget |
| 1 | 155 000 | 150 000 |
| 2 | 147 000 | 150 000 |
| 3 | 162 000 | 157 000 |
I have tried using conditional formatting but I cannot get it right. Any comments or ideas?
17 Replies
- amitchandak
Super User
h4_dkj , you can do rule base conditional formatting . Where you can use [real] <150000 red.
Of use color measure with filed value option
Switch( True(),
[Real] <150000, "red",
"green"
)
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
- h4_dkj
Helper I
But does that support varians of the target. My budget shows that for month 3 we have estaimated a higher amount then 150 000, so hard coding a number want help me.
- v-yalanwu-msft
Community Support
Hi, h4_dkj ;
Try to create a measure :
condition = IF([4_Real]<[1_Budget],"red","green")then set conditional format.
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- h4_dkj
Helper I
Thanks for your input, that allmost solves it but when I implement it it is either all green or all read.
And I cannot figure out why 🙂
- v-yalanwu-msft
Community Support
Hi, h4_dkj ;
Oh, Too little information is provided, it is difficult to know the reasons for all green or all red, can you share more information or simple pbix example after removing sensitive information?