Forum Discussion
admin11
5 years agoMemorable Member
Expression allow me add more then 2 Reporting Code
Hi All
I have this expression work fine :-
_ASSET =
SWITCH(TRUE(),
'GL'[Reporting Code]>=50010 &&'GL'[Reporting Code]<=50010,"_ASSET",
BLANK())
May i know how to modify the above expression , so that i can add more then 2 Reporting Code into above expression below :-
50023
60025
Paul
Paul,
You can simplify it to
_ASSET = SWITCH( TRUE(), 'GL'[Reporting Code] IN {50010, 50023, 60025}, "_ASSET", BLANK() )Regards
Phil
6 Replies
- PhilipTreacySuper User
Paul,
You can simplify it to
_ASSET = SWITCH( TRUE(), 'GL'[Reporting Code] IN {50010, 50023, 60025}, "_ASSET", BLANK() )Regards
Phil
- admin11Memorable Member
Thank you phil , it work fine , now the expression shorter.
Can share using IF command, how the expression look like ?
Paul
- AnonymousNot applicable
Try this-
_ASSET =SWITCH(TRUE(),'GL'[Reporting Code]>=50010 &&'GL'[Reporting Code]<=50010,"_ASSET",'GL'[Reporting Code]>=50023 &&'GL'[Reporting Code]<=50023,"_ASSET",'GL'[Reporting Code]>=60025 &&'GL'[Reporting Code]<=60025,"_ASSET",BLANK())