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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DRNEWTR
Frequent Visitor

measure ratio calculating

How can i measure Ratio of _lineamount to total _lineamount columns

 

DRNEWTR_0-1651434463247.png 

DRNEWTR_0-1651434824421.png

Like this

ratio =   152/404=0,37 ??

 

DRNEWTR_0-1651439344414.png

 

 

 

1 ACCEPTED SOLUTION
jsaunders_zero9
Responsive Resident
Responsive Resident

Hi @DRNEWTR 

jsaunders_zero9_0-1651445045135.png

_LineAmount = SUM('Table'[LineAmount])
Total = CALCULATE(SUM('Table'[LineAmount]),ALL('Table'))
Ratio = DIVIDE([_LineAmount],'Table'[Total],0)

Try summing the Line Amount total by removing the filter using the All function, then divide this by the simple sum.

Let me know how you go.

Thanks James

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

Line amount = sum(Data[_lineamount])

Line amount total = calculate([line amount],all(Data[_skuname]))

Ratio = divide([Line amount],[Line amount total])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
jsaunders_zero9
Responsive Resident
Responsive Resident

Hi @DRNEWTR 

jsaunders_zero9_0-1651445045135.png

_LineAmount = SUM('Table'[LineAmount])
Total = CALCULATE(SUM('Table'[LineAmount]),ALL('Table'))
Ratio = DIVIDE([_LineAmount],'Table'[Total],0)

Try summing the Line Amount total by removing the filter using the All function, then divide this by the simple sum.

Let me know how you go.

Thanks James

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.