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
Anmolgan
Post Prodigy
Post Prodigy

Powerbi Stacked Bargraph modeling

I am looking to create a data model where there will be sales for past 5 years of various 5 comapnies that will contain some users of each, and will be creating a stacked bargraph that will contain sales of a specific user with stacked bar graph that will contain aggregated sales of each company on each year. So if user a logins he would see his company sales with comparison to aggregated sales of all the companies of each year, how something like this can be achived.

1 REPLY 1
v-jiascu-msft
Employee
Employee

Hi @Anmolgan,

 

There could be two approaches.

1. Create a measure like this. You can add more conditions for other users.

PerUser =
IF (
    USERPRINCIPALNAME () = "user0@email.com",
    [Company 1],
    IF ( USERPRINCIPALNAME () = "user1@email.com", [Company 2], 0 )
)

2. Using RLS. Please refer to power-bi/service-admin-rls and power-bi/desktop-rls.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.