cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ganeshm Frequent Visitor
Frequent Visitor

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 3

Re: DAX expression for filtering with arrays

hi

are you using tabular model or direct import to Power BI.

If Tabular model , you can ahcieve it using Row Level Security

ganeshm Frequent Visitor
Frequent Visitor

Re: DAX expression for filtering with arrays

I am using direct query to the data source (Azure Data Warehouse).

Re: DAX expression for filtering with arrays