Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hello.
I have a dataset with Sales Prices for different Items, Customers and start/ending dates.
Like this:
Item No | Customer | Starting Date | Unit Price | Ending Date |
10000 | A | 01.01.2018 | 100 | 31.12.2018 |
10000 | A | 01.01.2019 | 110 | 31.12.2019 |
10000 | A | 01.01.2020 | 120 | |
10000 | B | 01.01.2018 | 150 | 31.12.2018 |
10000 | B | 01.01.2019 | 160 | 31.12.2019 |
10000 | B | 01.01.2020 | 170 | |
10000 | Dicount A | 01.01.2018 | 10 | 31.12.2018 |
10000 | Dicount A | 01.01.2019 | 11 | 31.12.2019 |
10000 | Dicount A | 01.01.2020 | 12 | |
20000 | A | 01.01.2018 | 50 | 31.12.2018 |
20000 | A | 01.01.2019 | 60 | 31.12.2019 |
20000 | A | 01.01.2020 | 70 | |
20000 | B | 01.01.2018 | 70 | 31.12.2018 |
20000 | B | 01.01.2019 | 75 | 31.12.2019 |
20000 | B | 01.01.2020 | 80 | |
20000 | Dicount A | 01.01.2018 | 5 | 31.12.2018 |
20000 | Dicount A | 01.01.2019 | 6 | 31.12.2019 |
20000 | Dicount A | 01.01.2020 | 7 |
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 No | Sales code | Unit Price |
10000 | A (minus disc) | 108 |
10000 | B | 170 |
20000 | A (minus disc) | 63 |
20000 | B | 80 |
Thanks!
Regards
Andreas
Solved! Go to Solution.
Oh, ok, I'll post it in the right forum then 🙂
Thanks 🙂
Mvh
Andreas
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |