Forum Discussion
Nick555
4 years agoHelper I
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...
- 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/
tackytechtom
4 years agoMost Valuable Professional
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/