Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Conditional Format showing wrong results

Hi Community, Need your help here. I am having a Total amount, One of the numeric field. I want to apply Conditional Format with Back ground Color on it.   The Requement here is when ever ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

    I created some data:

    Here are the steps you can follow:

    1. Create measure.

    %GT Total =
    var _total=SUMX(ALL('Table'),'Table'[amount])
    var _group=MAX('Table'[amount])
    return
    IF(HASONEVALUE('Table'[date]),
    DIVIDE(_group,_total),DIVIDE(_total,_total))

    format =
    SWITCH(
        TRUE(),
        [%GT Total] <=0.03,"red",
        [%GT Total]>0.03&&[%GT Total]<=0.06,"yellow",
        "green")

    2. Click Format – Conditional formatting – select [%GT Total] – Background color – Advanced controls.

    3. Enter the Background color interface.

    Format style – Field value.

    4. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly