Forum Discussion

ganeshm's avatar
ganeshm
Frequent Visitor
9 years ago

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