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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

How to add rows to a table based on a condition?

 

Hello everybody! 

 

I would like to create a table in which I can give access to a certain page of a report for a certain user

Imagine I have a table like this:

 

tasbla 1.JPG

 

I have another table in which I have the name of every report page:

 

tasbla 2.JPG

I want to get a table in which I have the users and all the pages at which they hace access to depending on their group. Group 1 can see all pages, but group 2 only can see the Team page:

 

tasbla 3.JPG

I know how to doing it with R but the "Run R script" option in Power BI doesn't work fine because it always gives me an empty table. I wanto to know how to do it with DAX. 

 

Thanks in advance! 

1 ACCEPTED SOLUTION

Apply a FILTER () on top of the CROSSJOIN ().

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

in DAX you do this with CROSSJOIN()

Anonymous
Not applicable

But with CROSSJOIN () function the result is a cartesian product for every email and for every page. The thing is I need the cartesian product for every email but for certain pages (depending what group they belong to).

Apply a FILTER () on top of the CROSSJOIN ().

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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