Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all.
I am trying to run a DAX command based on an If conditions based on multiples values.
msExchRecipientDisplayType | msExchRecipientTypeDetails | msExchRemoteRecipientType | Output |
-2147483642 | 34359738368 | 102 | OnPrem_SharedMailbox |
-2147483642 | 2147483648 | 3 | OnPrem_UserMailbox |
-2147481850 | 8589934592 | 36 | OnPrem_RoomMailbox |
If dont match all this conditions the output must be "OnPrem_Check"
Solved! Go to Solution.
OnPremiseMailboxType =
SWITCH (
TRUE (),
'05_AD_UsersDetails'[msExchRecipientDisplayType]=-2147483642 && '05_AD_UsersDetails'[msExchRecipientTypeDetails]=34359738368 && '05_AD_UsersDetails'[msExchRemoteRecipientType]=102, "OnPrem_SharedMailbox",
'05_AD_UsersDetails'[msExchRecipientDisplayType]=-2147483642 && '05_AD_UsersDetails'[msExchRecipientTypeDetails]=2147483648 && '05_AD_UsersDetails'[msExchRemoteRecipientType]=3, "OnPrem_UserMailbox",
'05_AD_UsersDetails'[msExchRecipientDisplayType]=-2147481850 && '05_AD_UsersDetails'[msExchRecipientTypeDetails]=8589934592 && '05_AD_UsersDetails'[msExchRemoteRecipientType]=36,"OnPrem_RoomMailbox",
"OnPrem_Check"
)
OnPremiseMailboxType =
SWITCH (
TRUE (),
'05_AD_UsersDetails'[msExchRecipientDisplayType]=-2147483642 && '05_AD_UsersDetails'[msExchRecipientTypeDetails]=34359738368 && '05_AD_UsersDetails'[msExchRemoteRecipientType]=102, "OnPrem_SharedMailbox",
'05_AD_UsersDetails'[msExchRecipientDisplayType]=-2147483642 && '05_AD_UsersDetails'[msExchRecipientTypeDetails]=2147483648 && '05_AD_UsersDetails'[msExchRemoteRecipientType]=3, "OnPrem_UserMailbox",
'05_AD_UsersDetails'[msExchRecipientDisplayType]=-2147481850 && '05_AD_UsersDetails'[msExchRecipientTypeDetails]=8589934592 && '05_AD_UsersDetails'[msExchRemoteRecipientType]=36,"OnPrem_RoomMailbox",
"OnPrem_Check"
)
I tested with the "Swithch" funtion and isclose to work as expected I just need to add "OnPrem_Check"
I am rtying to run the Fx LOOKUPVALUE but I am not sure about the syntaxis.
try the function of LOOKUPVALUE, and let the last arguement as "OnPrem_Check"
User | Count |
---|---|
23 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |