Forum Discussion
khisla
Helper II
1 year agoDAX Command - IF variables, SWITCH and COALESCE
I need a DAX commend to identify the store to which an employee is based to sales commission calculation purposes Please find table of specific scenarios and expected results for each one. So I hav...
- 1 year ago
Hello khisla
You added one ) in your second condition in the CASE
Normally, the following measure should workNext= VAR EntranceStore = SELECTEDVALUE('HILAN'[Entrance Store]) VAR ExitStore = SELECTEDVALUE('HILAN'[Exit Store]) VAR DefaultStore = SELECTEDVALUE('HILAN'[Employee Default Store]) RETURN SWITCH( TRUE(), NOT(ISBLANK(EntranceStore)) && EntranceStore <> DefaultStore, EntranceStore, NOT(ISBLANK(ExitStore)) && ExitStore <> DefaultStore, ExitStore, NOT(ISBLANK(EntranceStore)) || EntranceStore = DefaultStore || ISBLANK(ExitStore) || ExitStore = DefaultStore, DefaultStore, DefaultStore )
khisla
Helper II
1 year agoGot an error message
V-yubandi-msft
Community Support
1 year agoHi khisla ,
Have you been able to review the PBIX file I attached? If not, please check it when you have a moment. The logic in that file has been implemented correctly.
Thank You.