Forum Discussion
Anonymous
7 years agoNot applicable
Dynamic Measure based on Month selected
I have two measure values. One specific for January and other for rest of the months. If Jan is selcted then display Jan value else display other value. Can this be done using an switch? Final...
- 7 years ago
Well yes it can although I probably would not use SWITCH for only 1 condition but rather if there are multiple conditions
Final Term = SWITCH ( VALUES ( 'Forecast Calendar'[Month Short Name] ), "Jan", [January Terms], [Terms Non-Blank] )I probably would go with this since there's only 1 IF Statement
Final Term = IF ( SELECTEDVALUE ( 'Forecast Calendar'[Month Short Name] ) = "Jan", [January Terms], [Terms Non-Blank] )However they should both work! :smileyhappy:
Sean
7 years agoCommunity Champion
Well yes it can although I probably would not use SWITCH for only 1 condition but rather if there are multiple conditions
Final Term =
SWITCH (
VALUES ( 'Forecast Calendar'[Month Short Name] ),
"Jan", [January Terms],
[Terms Non-Blank]
)I probably would go with this since there's only 1 IF Statement
Final Term =
IF (
SELECTEDVALUE ( 'Forecast Calendar'[Month Short Name] ) = "Jan",
[January Terms],
[Terms Non-Blank]
)However they should both work! :smileyhappy:
Anonymous
7 years agoNot applicable
Doesn't like the syntax for 'SELECTEDVALUE'. The SWITCH works just for Jan but when I select Feb, it displays 0 instead of the feb terminations.