Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
Giving this table:
I need to show only person id, who have a action different of U5 with the folowing list of Action Reason reason: U2, Z1.
So in this case, it should exclude Person ID: 3048, 6037, 8311, 11530.
I'm trying this but it doesn`t work:
=if([Action]='U5'] and [Action Reason]<>'U2' or [Action Reason]<>'Z1',[Person ID])
What am I missing?
Regards,
Daniel M
Try this
=If([Action] = 'U5' and Match([Action Reason], 'U2', 'Z1'), [Person ID])
Hi, try this:
Only({<Action-={'U5'}, [Action Reason]={'U2','Z1'}>}PersonID)
It gives me an error of Invalid dimension. I'm trying to present it in a straight table
This is a measure.
Edit: I have misread your requirement. So you are trying to exclude the combinations U5+Z1 and U5+U2?
Create the following line in the script.
IF(Action='U5' AND MATCH([Action Reason],'Z1','U2'), 'Exclude','Include') AS Flag
Then your script will look something like this:
Load
PersonID,
Action,
[Action Reason],
IF(Action='U5' AND MATCH([Action Reason],'Z1','U2'), 'Exclude','Include') AS Flag
Inline [
PersonID,Action,Action Reason
3048,U5,Z1
4433,U9,U2
11530,U5,U2
11135,U5,U1
]
(Delimiter is ',')
In the table use the following measure:
Only({<Flag={'Include'}>}PersonID)
Try this
=If([Action] = 'U5' and Match([Action Reason], 'U2', 'Z1'), [Person ID])
Genius!!
Thank you Sunny, I was expecting if you some day replied this answer. You Rocks!