Forum Discussion
Anonymous
4 years agoNot applicable
Extra closing parenthesis added to a DAX Switch statement
I need to do conditional formatting based on two fields instead of one. To do this, I created a switch statement that creates an integer state variable that (I hope) can be used in conditional forma...
ERD
Community Champion
4 years agoAnonymous ,
As far as I can see, you are creating a calculated column.. I don't see any issues:
12amState =
SWITCH (
MAX ( [NoiseCategory], 0 ),
1, IF ( MAX ( [12am], 0 ) = 0, 1, 2 ),
2, IF ( MAX ( [12am], 0 ) = 0, 3, 4 ),
3, IF ( MAX ( [12am], 0 ) = 0, 5, 6 ),
IF ( MAX ( [12am], 0 ) = 0, 7, 8 )
)
You can check your formula here for syntax errors and for better formatting: https://www.daxformatter.com/
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.