Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ganeshm
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
vickyprudhvi
Helper IV
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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.