The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
My data set looks like the following. Each year is divided into multiple pricing windows, and the start date of each pricing window falls on a different date each year. How do I create a measure so I can have volume for current year pricing window and that for last year same pricing window side by side?
I tried the below, but it is returning the sum of all volumes in that pricing window, instead of by SKU.
SKU | Year | Pricing Window | Volume | Price | Date |
SKU 1 | 2020 | 1 | 200 | 45 | 1/2/2020 |
SKU 1 | 2020 | 2 | 210 | 46 | 2/1/2020 |
SKU 1 | 2020 | 3 | 189 | 45 | 3/4/2020 |
SKU 1 | 2020 | 4 | 120 | 45 | 4/1/2020 |
SKU 2 | 2020 | 1 | 300 | 45 | 1/2/2020 |
SKU 2 | 2020 | 2 | 250 | 46 | 2/1/2020 |
SKU 2 | 2020 | 3 | 204 | 43 | 3/4/2020 |
SKU 2 | 2020 | 4 | 350 | 45 | 4/1/2020 |
SKU 1 | 2019 | 1 | 120 | 44 | 1/1/2019 |
SKU 1 | 2019 | 2 | 126 | 44 | 2/1/2019 |
SKU 1 | 2019 | 3 | 200 | 43 | 3/1/2019 |
SKU 1 | 2019 | 4 | 72 | 43 | 4/1/2019 |
SKU 2 | 2019 | 1 | 360 | 44 | 1/1/2019 |
SKU 2 | 2019 | 2 | 300 | 42 | 2/1/2019 |
SKU 2 | 2019 | 3 | 200 | 43 | 3/1/2019 |
SKU 2 | 2019 | 4 | 420 | 44 | 4/1/2019 |
Solved! Go to Solution.
Hi @Anonymous ,
Try this measure:
If you consider it as a solution, please mark as a solution and kudos.
Ricardo
Hi @Anonymous ,
Try this measure:
If you consider it as a solution, please mark as a solution and kudos.
Ricardo
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |