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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Measure to subtract percentage from another measure

Hi PB-I community,

Does someone know how to create a Measure that calcutates a value by substrating a percentage?

So.. I have a column "SaleQty" in my Table that contains the quantity of items sold <type: "123" whole number>

I have a 2nd column "EndUserItemPrice" that contains the end-user price per item. <type:" $" fixed decimal number>

and a 3rd column "DealerDiscountPct" that contains the dealer discount percentage but stored as a number <type: "123" whole number>,  not as percentage.

I created a measure "EndUserSalesAmount" that multiplies "SaleQty" x "EndUserItemPrice" that works fine.

Now I need to substract the dealer discount "DealerDiscountPct" from this "EndUserSalesAmount"

For instance:

"SaleQty"= 2 items

"EndUserItemPrice"= $50

=> EndUserSalesAmount Measure = SUMX ( Sales, Sales[SaleQty] * Sales[EndUserItemPrice])

=> 2*50= 100

"DealerDiscountPct"= 10

I'm stuck on the new measure "DealerSalesAmount" to subtract 10 percent from the "EndUserSalesAmount". The outcome should be $100 - 10% = $90 Thx in advance!

G.

6 REPLIES 6
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Then just subtract since it is a whole number.

 

Create a measure

 

DealerSalesAmount = [EndUserSalesAmount Measure]  - MAX('Table'[DealerDiscountPct])

 

 

where 

[EndUserSalesAmount Measure]  =   SUMX ( Sales, Sales[SaleQty] * Sales[EndUserItemPrice]) 

 

 

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

 

 

 

Anonymous
Not applicable

Hi @harshnathani 

 

Thx for your quick reply! 

However I'm afraid your measure won't work because I just can't subtract the number (of percentage) because it doens't represent a percentage.

I tried to change the type from <123 Whole Number> to <% Percentage> in Query Editor, but then it changes the number from f.i. 25 to 2500, so I diveded all by 100, so now I've got 25% in the Sales[DealerDiscountPct] column.

I hope I'm getting closer to the final measure, but still struggeling how to create a measure that 

DealerSalesAmount = [EndUserSalesAmount Measure] ......?????  substracts the Sales[DealerDiscountPct]

 

Thx

G.

 

Hi @Anonymous ,

 

My bad. I misread some details earlier.

 

I think this is what you are looking for.

 

1.jpg

 

 

 

2.JPG

 

 

EndUserSalesAmount Measure = SUMX ('Table', 'Table'[End User Item Price]*'Table'[Units])

 

 

Dealers Sale Amount = [EndUserSalesAmount Measure] *(1-MAX('Table'[Discount]))

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

Did I answer your question? Mark my post as a solution!

 

 

amitchandak
Super User
Super User

@Anonymous , Try like

EndUserSalesAmount Measure = SUMX ( Sales,(Sales[SaleQty] * Sales[EndUserItemPrice]) * (100 -Sales[DealerDiscountPct]))

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
Anonymous
Not applicable

Hi  @amitchandak 

 

Please note I don't need to calculate the EndUserSalesAmount as this number is known.

I need to calculate the  DealerSalesAmount by subtracting the DealerDiscountPct from the EndUserSalesAmount.

 

@Anonymous , I think that is what I have given

 

SUMX ( Sales,(Sales[SaleQty] * Sales[EndUserItemPrice]) * (100 -Sales[DealerDiscountPct]))

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.