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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jonnyko
Regular Visitor

Quick, easy and urgent: DAX division of variable numerator by fixed denominator

Hi everyone!

 

Table 1:

SiteThemeScore
LondonA2
LondonA3
LondonA2
LondonB4
ParisA3
ParisA4
ParisA1
ParisB1

 

 

Table 2: Dim_ThemeMax

ThemeMax
A15
B6

 

How do I create something in DAX to plot each site's score per theme as a % of theme max score, rather than just plot the raw scores per theme?

 

Many thanks!!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @jonnyko 

I am not sure how your desired outcome looks like, but please check the link down below.

 

Picture1.png

 

score percentage =
SUMX('Table', 'Table'[Score]/RELATED(ThemeMax[Max]))
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, @jonnyko 

I am not sure how your desired outcome looks like, but please check the link down below.

 

Picture1.png

 

score percentage =
SUMX('Table', 'Table'[Score]/RELATED(ThemeMax[Max]))
 
 
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


thanks for the quick response Jihwan, it works on your file and data structure is identical to mine, but when I put it into my Power BI I think the denominator isn't quite pulling through the value per theme. It seems maybe that it's just a fixed value of the count of number of themes there are - there is a 1:many relationship between my Dim_theme table and table with the individual scores though based on Theme....

any thoughts?

Hi, @jonnyko 

Thank you for your feedback.

Please share your sample pbix file's link here, then I can try to look into it to come up with a more accurate measure.

Thanks.

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


just realised I went wrong by adding a sum( to the table score within my sum( already - your solution has worked. Thank you Jihwan!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.