Forum Discussion

h4_dkj's avatar
h4_dkj
Icon for Helper I rankHelper I
5 years ago

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

 

MonthRealBudget
1155 000150 000
2147 000150 000
3162 000157 000

 

I have tried using conditional formatting but I cannot get it right.  Any comments or ideas?

17 Replies

  • 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's avatar
      h4_dkj
      Icon for Helper I rankHelper 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.

    • h4_dkj's avatar
      h4_dkj
      Icon for Helper I rankHelper 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's avatar
        v-yalanwu-msft
        Icon for Community Support rankCommunity 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?