Forum Discussion

Nick555's avatar
Nick555
Helper I
4 years ago
Solved

Using Switch With Calculated Variable

Greetings. I am trying to use a SWITCH statement to produce a result for a card. I want to base the result off of a percentage that is calculated. If the percentage is  >=.01 then I want the origina...
  • tackytechtom's avatar
    4 years ago

    Hi Nick555 ,

     

    To me it looks like a syntax issue. Can you try this?

    Measure = 
    SWITCH (
        TRUE(),
        DIVIDE ( COUNT ( sheet1[review not completed] ), COUNT ( sheet1[review date] ) ) >= 0.01, DIVIDE ( COUNT ( sheet1[review not completed] ), COUNT ( sheet1[review date] ) ),
        DIVIDE ( COUNT ( sheet1[review not completed] ), COUNT ( sheet1[review date] ) ) < 0.01, "<.01",
        BLANK()
    )


    If this does not work, feel free to share some sample data and I can have a deeper look into it 🙂

     

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