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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
rorand
Helper I
Helper I

Subtract value only if value in other colum

Hello.

I have a dataset with Sales Prices for different Items, Customers and start/ending dates.
Like this:

Item NoCustomerStarting DateUnit PriceEnding Date
10000A01.01.201810031.12.2018
10000A01.01.201911031.12.2019
10000A01.01.2020120 
10000B01.01.201815031.12.2018
10000B01.01.201916031.12.2019
10000B01.01.2020170 
10000Dicount A01.01.20181031.12.2018
10000Dicount A01.01.20191131.12.2019
10000Dicount A01.01.202012 
20000A01.01.20185031.12.2018
20000A01.01.20196031.12.2019
20000A01.01.202070 
20000B01.01.20187031.12.2018
20000B01.01.20197531.12.2019
20000B01.01.202080 
20000Dicount A01.01.2018531.12.2018
20000Dicount A01.01.2019631.12.2019
20000Dicount A01.01.20207 

 

This is what I want:

IF Customer = A then subtract Discount A from A

IF Customer <> A then no subtraction

 

Expected result with filter Ending date = (blank):

Item NoSales codeUnit Price
10000A (minus disc)108
10000B170
20000A (minus disc)63
20000B80

 

Thanks!

 

Regards

Andreas

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

This does not look to be a DAX calculation but a Power Query one.

Best
D

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This does not look to be a DAX calculation but a Power Query one.

Best
D

Oh, ok, I'll post it in the right forum then 🙂
Thanks 🙂

 

Mvh

Andreas

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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