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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Aamir2021
Advocate I
Advocate I

How to get DAX measure for Unit Price*Quantity-Discount 20%

Hi,

I want to calculate with the help of DAX below measure

 

Unit Price * Quantity - Discount 20%

How to get the DAX measure?

 

I would be grateful if you could help me with this problem.

 

Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Aamir2021 , Try a measure like

Sumx(Table, ([Unit Price] * [Quantity])*0.8)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Aamir2021 ,

 

You will need relationships between these tables. That would help Power BI to get the corresponding Quantity for specific Unit Price along with the Discount. Perhaps you have a product column in the table?

 

Best Regards,

Jay

amitchandak
Super User
Super User

@Aamir2021 , Try a measure like

Sumx(Table, ([Unit Price] * [Quantity])*0.8)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for your suggestion.

Hi @amitchandak,

Thanks for your reply. However, it does not work.

There are three tables. The first table has Unit Price, second table has Order Quantity and last table has Discount allowed in percantage. 

 

My question is the Unit price is 15,  Order Quantity is 20 and Discount allowed is 20% 

So how can we calculate dax to get the Sales after discount?

I hope you get the my point.

 

 

@Aamir2021 , You need a common dimension. assume you have these measures from two tables

[Unit Price] , [Quantity] and common item dimension

 

Sumx(values(item[Item ID]), calculate(([Unit Price] * [Quantity])*0.8)))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.