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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
MeenaSankar
Frequent Visitor

Reporting on Degenerate dimension from 2 fact tables with a dimension in between

Hello,

 

I have 2 fact tables (user, sales) and a dimension table (loaction) in between. Now I need to report on a degenrate dimension on one of the fact table (called brand in sales), a measure on the same fact table (count rows in sales) and a measure on the second fact table (count of related users).

 

Screenshot 2023-10-12 at 3.14.57 pm.pngScreenshot 2023-10-12 at 3.15.36 pm.png

 

 

Desired table is what I am getting when I join the dimesnions and metrics together. However as you cab see the user count is the same for all brands. But I really would like to see is what  are the count of users for those locations from where the brands were purchased. So I would like something like this.

 

Screenshot 2023-10-12 at 3.24.34 pm.png

 

As you can see adidas was bought frpom location 1 which has only 2 users. 

 

I cant create a many to many relation between users and sales as I have a RLS set up using profile and staff.

 

Is there any way I can solve this.

 

Please please please help.

 

@johnt75 , @MFelix , @OwenAuger 

 

Regards,

Meena

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @MeenaSankar ,

 

Try the following measure:

Total Users = var locationvalues =VALUES(Sales[location])
Return
CALCULATE(COUNTROWS(Users), Users[location_id] in locationvalues)

MFelix_0-1697096420014.png

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @MeenaSankar ,

 

Try the following measure:

Total Users = var locationvalues =VALUES(Sales[location])
Return
CALCULATE(COUNTROWS(Users), Users[location_id] in locationvalues)

MFelix_0-1697096420014.png

 

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you so much @MFelix 

That seems to be working!

As a last resort, I was even planning to make the relation between Sales and location bidirectional😂 But now that wont be necessary

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.