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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

View discussion in a popup

Replying to:
Avantika-Thakur
Solution Supplier

Hi watje255_ju ,

You can try using the below measure for Discount calculation - 

 

Discount =
VAR DiscountAmount = calculate ([Sales Amount],
ALLEXCEPT(Discount,Discount[Sales Order Number]),Discount[Product Code]= "Discount" )

VAR SalesAmount = calculate ([Sales Amount], ALLEXCEPT(Discount,Discount[Sales Order Number]),Discount[Product Code]<> "Discount" )

Return DIVIDE(discountAmount,SalesAmount,0)

 

Hope this helps!
 
Please accept the solution if this answers your query.
Thanks!
Avantika

View solution in original post