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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Gofin
Regular Visitor

Need help in calculations

Hi everyone,

Based on Name filter selection ,How to calculate this ratio? Please help with dax measures or column formulas .

For example : if Name 'A' ,'B'  is selected in the slicer, then ratio for name 'A' will be 1/34 = 0.029 and for name 'B' will be 1/34 = 0.029.Here 34 is A+B = 12+22

 

Name  qty  count     Ratio
A        12      1           0.014493
B        22       1           0.014493
C       13       2             0.028986
D       22      4              0.057971
Total 69

 
1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Gofin 
You can use 3 measures :

sum _QTY = sum('Table'[QTY])
sum_Count = sum('Table'[Count])
Ratio = divide ([sum_Count],CALCULATE([sum _QTY],ALLSELECTED('Table'[Name])))
Ritaf1983_0-1696935375460.png

You can download the pbix from this link 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @Gofin 
You can use 3 measures :

sum _QTY = sum('Table'[QTY])
sum_Count = sum('Table'[Count])
Ratio = divide ([sum_Count],CALCULATE([sum _QTY],ALLSELECTED('Table'[Name])))
Ritaf1983_0-1696935375460.png

You can download the pbix from this link 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors