Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a DAX filter to see if the user is merchant but want to extend to see if they belong to Manger or Director. Any way to extend this filter?
='Ownership'[Merchant]=LOOKUPVALUE('Ownership'[Merchant], 'Ownership'[UPN], USERNAME())
Solved! Go to Solution.
Gotcha.
In that case you will have to get more fancy 🙂
The equivalent of this:
'Ownership'[Merchant]=LOOKUPVALUE('Ownership'[Merchant], 'Ownership'[UPN], USERNAME())
is roughly:
'Ownership'[Merchant]=CALCULATE(VALUES('Ownership'[Merchant]), FILTER(Ownership, Ownership[UPN] = USERNAME()))
so to add more conditions:
'Ownership'[Merchant]=CALCULATE(VALUES('Ownership'[Merchant]), FILTER(Ownership, Ownership[UPN] = USERNAME() || Ownership[FirstName] = "Bob"))
Hi @sgsukumaran,
If you still have not resolved your issue based on the solution above. Please post some samle data for further analysis. So that we can post DAX which is close to your requirement.
Thanks,
Angelia
https://msdn.microsoft.com/en-us/library/gg492170.aspx
The LOOKUPVALUE function can look at as many columns as you want...
@Anonymous
Thats correct but I want the "OR" condition to be applied. The User can be a mechant or manager or Director
Gotcha.
In that case you will have to get more fancy 🙂
The equivalent of this:
'Ownership'[Merchant]=LOOKUPVALUE('Ownership'[Merchant], 'Ownership'[UPN], USERNAME())
is roughly:
'Ownership'[Merchant]=CALCULATE(VALUES('Ownership'[Merchant]), FILTER(Ownership, Ownership[UPN] = USERNAME()))
so to add more conditions:
'Ownership'[Merchant]=CALCULATE(VALUES('Ownership'[Merchant]), FILTER(Ownership, Ownership[UPN] = USERNAME() || Ownership[FirstName] = "Bob"))
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |