Forum Discussion
al1ceDav1n
3 years agoRegular Visitor
SWITCH STATEMENT NOT WORKING
Hi Could some one help with the below SWITCH statement? Thanks in advance Volume = SWITCH( 'RTY_UY'[EFFECT DATE] and 'TYU_JP' [REMAINING_FLAG] = "N", 0 ('RTY_UY'[EFFECT DATE] and 'TYU_JP' [RE...
mlsx4
Memorable Member
3 years agoBut then, include it in the calculate part. Something like this:
Volume =
var selectedDate= SELECTEDVALUE('RTY_UY'[EFFECT DATE])
RETURN SWITCH( 'TYU_JP' [REMAINING_FLAG],
"N", 0,
"Y",CALCULATE(COUNT([INT_ID]),DimDate= selectedDate),
CALCULATE(COUNT([INT_ID]),DimDate= selectedDate))
al1ceDav1n
3 years agoRegular Visitor
Hi,
For some reason dislikes the "Y" so close
Thanks
- mlsx43 years ago
Memorable Member
Hi al1ceDav1n
I don't understand what's happening. Maybe you need to put a SELECTEDVALUE('TYU_JP' [REMAINING_FLAG]). It is really difficult to figure out the problem without having any information about the structure, the input, the output...