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
Anonymous
Not applicable

how to pass value to a role from DAX Studio

I have a composite model, where my user's table is a direct query and the rest of the data is import. 

I would like to use DAX Studio to analyze the DAX performance by passing the user. 

 

Without "viewing as a user" I am able to get the visual back in 300 ms - 400 ms, but on the PBI Service when the user is viewing the same visual it is taking 200,000ms +, I am trying to analyze this using DAX studio so that I can break my measure in multiple pieces by adding/removing the complex logic. But, I am not able to find how I can run the measure definition in DAX Studio with the security as a user(role).

1 ACCEPTED SOLUTION

You need to be an admin of the Analysis Services engine to do this. Try to get the exact username to use by using Profiler as an admin. If you are using Power BI Desktop to test this, you might want to simulate this with a local username. If you are trying to connect to Power BI Service, I'm worried you cannot simulate another user because you are not an administrator.

If you use the Power BI Desktop feature to test a role, you can use the same technique. If you cannot test the role locally, you might be in trouble because you are not an administrator of the backend AS engine used by Power BI.

 

View solution in original post

7 REPLIES 7
Greg_Deckler
Super User
Super User

Best to ask @marcorusso. Is your RLS code complex? 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler: Thank you, for the reply.

For this report, RLS code is simple, just the volume of data going to SQL server and getting back and the summarizing, that being said I have some complex DAX in the measure (Ranking, sorting, grouping and sum)

Use Effective User Name in connection dialog box as explained here:

https://daxstudio.org/documentation/features/connection-dialog/

Anonymous
Not applicable

@marcorusso : Thank you, I did try adding the user, but I am getting error.

Maybe because of my security on the role us not with AD Account?

This report is embedded in a custom portal and I get the UserID from our custom portal.2020-04-07 03_41_59-DaxStudio - 2.10.1.png

 

You need to be an admin of the Analysis Services engine to do this. Try to get the exact username to use by using Profiler as an admin. If you are using Power BI Desktop to test this, you might want to simulate this with a local username. If you are trying to connect to Power BI Service, I'm worried you cannot simulate another user because you are not an administrator.

If you use the Power BI Desktop feature to test a role, you can use the same technique. If you cannot test the role locally, you might be in trouble because you are not an administrator of the backend AS engine used by Power BI.

 

Thanks @marcorusso figured you would be the person who would know!

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hmm, maybe it is something going on with the interaction between the two sets of DAX code. I wonder if you could emulate that interaction by combining the code in an evaluation statement in DAX Studio?

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.