Forum Discussion
Using Switch With Calculated Variable
- 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/
Hi Nick555,
Hm, I can see why the measure is showing "< 0.01" cause that is how we coded it:
If your calculation returns a value equal or more than 0.01, then return that calculated value
If your calculation returns a value lowet than 0.01, then return "< 0.01"
ele return blank()
We covered all possible outcomes already in the first two if clauses, meaning we will never return blank(). Can you clarify in which cases we shall return blank()?
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Apologies. You are correct that we covered the outcomes. Result of staring to long at this I'm afraid.
What I was thinking/wanting was that when the card above it (Revicew Not completed count) shows Blank, that this card show blank as well.
- Nick5554 years agoHelper I
Thanks you tomfox!!
I was able to get it to work. After reviewing what you sent me, and a night of not looking at the issue, I took what you gave me and made a modification. Couldn't have done it without you!!!
- tackytechtom4 years agoMost Valuable Professional
Hi Nick555 ,
Happy, I could help you! You might wanna consider marking the reply as a solution 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/