Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Community,
I have a datatable where we have sales and profit for different items for different years.
Now, the ask is that "Sales" should be calculated only when the "Item name" exists for the previous year. Also, we dont have a date/calendar table.
Example:
When "A" is selected under "Item" and "2022" is selected from Year silcer. Sales value should be 100.
when Year "2021" is selected Sales should be 200 (Apple)+100 (Papaya) = 300
Item | Item name | Year | Sales | Profit |
A | Apple | 2022 | 100 | 200 |
A | Apple | 2021 | 200 | 400 |
A | Apple | 2020 | 500 | 1000 |
A | Papaya | 2021 | 100 | 400 |
A | Papaya | 2020 | 40 | 160 |
V | Cucumber | 2022 | 150 | 500 |
V | Cucumber | 2021 | 250 | 800 |
Is it possible to achieve this in power bi - dax?
Thanks for your help in advance.
Solved! Go to Solution.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
32 | |
30 | |
18 | |
18 |