Forum Discussion
Anonymous
7 years agoNot applicable
Use Switch and OR
Hi, Ive got a problem. I want to get multiple rules in a switch statement.. But its not working, only if u use OR-statement i can add 1 more rule.. Sample of the data/formula(its anonymized)...
- Anonymous7 years ago"There must be a better way, like :TEST =OR(SWITCH(TRUE(),SessionDetails[ReferredById]<>(1073,39050,440190,231049) 0,SessionDetails[User1Id] IN {1028,383575,93233,1013,259006,274202,361428,1011,262816} ||SessionDetails[User2Id] IN {1028,383575,93233,1013,259006,274202,361428,1011,262816}, 1,0)"TryTEST =SWITCH(TRUE(),NOT ( SessionDetails[ReferredById] IN { 1073,39050,440190,231049 } ), 0,SessionDetails[User1Id] IN {1028,383575,93233,1013,259006,274202,361428,1011,262816} ||SessionDetails[User2Id] IN {1028,383575,93233,1013,259006,274202,361428,1011,262816}, 1,0)
AnthonyTilley
7 years agoSolution Sage
Are you able to give some sample data showing the data you have and your desired outcome
If you have a PBIX file that i could down load i can try and impliment this for you
Anonymous
7 years agoNot applicable
Give back a TRUE if ReferredID equals 1 of the 4 desired ID's and if the match with 1 of the UserID's...
If ReferredByID equals 1073 OR 440190 OR 39050 OR 28536
AND UserID equals 1028 OR 383575 OR 93233 OR 1013 then TRUE
else will give back FALSE everytime.