Forum Discussion

Bizo's avatar
Bizo
Frequent Visitor
4 years ago
Solved

Dax Switch Measure for Icon Conditional Formatting

Hi everyone, was hoping someone could help me with a measure that I can use for an icon conditional formatting.

 

if ( vw_CAP_EO_Compliance_PT[Compliance Status] ) = "In Fact Finding" && [Days] <= 45, 1,

if ( vw_CAP_EO_Compliance_PT[Compliance Status] ) = "In Fact Finding" && [Days] > 45, 2,if ( vw_CAP_EO_Compliance_PT[Compliance Status] ) = "In Queue" && [Days] <= 60, 1,

if ( vw_CAP_EO_Compliance_PT[Compliance Status] ) = "In Queue" && [Days] > 60, 2

 

Any assistance would be greatly appreciated, thanks in advance!

  • Hi Bizo,

     

    Maybe something like this? 🙂

    Column = 
    SWITCH (
        TRUE(),
        'vw_CAP_EO_Compliance_PT'[Compliance Status] = "In Fact Finding" && 'vw_CAP_EO_Compliance_PT'[Days] <= 45, 1,
        'vw_CAP_EO_Compliance_PT'[Compliance Status] = "In Fact Finding" && 'vw_CAP_EO_Compliance_PT'[Days] >  45, 2,
        'vw_CAP_EO_Compliance_PT'[Compliance Status] = "In Queue"        && 'vw_CAP_EO_Compliance_PT'[Days] <= 60, 1,
        'vw_CAP_EO_Compliance_PT'[Compliance Status] = "In Queue"        && 'vw_CAP_EO_Compliance_PT'[Days] >  60, 2,
        BLANK()
    )

     

    Note, the DAX above is a calculated column. But I hope it gives you direction to fix it in your measure as well! 🙂

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/

2 Replies

  • tackytechtom's avatar
    tackytechtom
    Most Valuable Professional

    Hi Bizo,

     

    Maybe something like this? 🙂

    Column = 
    SWITCH (
        TRUE(),
        'vw_CAP_EO_Compliance_PT'[Compliance Status] = "In Fact Finding" && 'vw_CAP_EO_Compliance_PT'[Days] <= 45, 1,
        'vw_CAP_EO_Compliance_PT'[Compliance Status] = "In Fact Finding" && 'vw_CAP_EO_Compliance_PT'[Days] >  45, 2,
        'vw_CAP_EO_Compliance_PT'[Compliance Status] = "In Queue"        && 'vw_CAP_EO_Compliance_PT'[Days] <= 60, 1,
        'vw_CAP_EO_Compliance_PT'[Compliance Status] = "In Queue"        && 'vw_CAP_EO_Compliance_PT'[Days] >  60, 2,
        BLANK()
    )

     

    Note, the DAX above is a calculated column. But I hope it gives you direction to fix it in your measure as well! 🙂

     

    /Tom
    https://www.tackytech.blog/
    https://www.instagram.com/tackytechtom/

    • Bizo's avatar
      Bizo
      Frequent Visitor

      Thank you!  Saved me a ton of time!