Forum Discussion
DAX expression for filtering with arrays
Hello,
I am new to Power BI and in need of help.
I have two tables. User and Report
User:
1 - TestUser - ['A'] - ['E','F']
2 - UserOne - ['B','C'] - ['D']
A,B,C - product names
D,E,F - Order numbers
Report
1 - Completed - A - E
2 - InProgress - B - F
3 - Completed - C - D
4 - Completed - A - D
So, when I use the USERNAME() expression evaluated to the logged-in user, I need to see the reports table filtered based on product array and order_number array of the user. So that means, all the rows with products 'A' OR order_numbers 'E','F' should return (rows 1,2,4 in this case for TestUser and 2,3,4 for UserOne).
What would be the DAX expression to achieve this?
Thanks in Advance!!!
3 Replies
- vickyprudhvi
Helper IV
hi
are you using tabular model or direct import to Power BI.
If Tabular model , you can ahcieve it using Row Level Security
- ganeshmFrequent Visitor
I am using direct query to the data source (Azure Data Warehouse).
- vickyprudhvi
Helper IV
Please look into below link
https://powerbi.microsoft.com/en-us/documentation/powerbi-admin-rls/