Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to do the equivalent, in a calculated dimension, of a SQL IN statement.
Specifically, I only want to show rows where the UserID is the SalesRep or one of the sales assistants, so I want the condition to read:
if(UserID=SalesRep OR UserID IN ('John','Mary','Ted'),UserID,Null())
But QV doesn't have an "IN" function that I could find, and I don't want to type out four different OR conditions. Surely this exists! I've been through the documentation, and with its terrible search function, can't find anything that tells me how to do this.
Can someone please help?
Thanks
try using match: if(UserID=SalesRep OR match(UserID,'John','Mary','Ted'),UserID,Null())
try using match: if(UserID=SalesRep OR match(UserID,'John','Mary','Ted'),UserID,Null())
HI
Try with match() function
Like this
if(Match(UserID, 'John','Mary','Ted'),UserID,Null())
Hope it helps
Thanks, that worked fine.
Thanks Mayil, Gysbert beat you to it!
Match itself does OR operation . so simply it also works
if(match(UserID,SalesRep,'John','Mary','Ted'),UserID,Null())
Hope it helps
Celambarasan