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 PowerBI Community,
I'm struggling with calculating sum of FULL YEAR when slicer on Month is applied.
I have a table like that:
Now I would like to have a slicer on MONTH and calculate sum of FULL YEAR, for example:
Slicer Month: 2019-05
Sales Amount: 300
Sales Amount PY: 150
Sales Amount FULL YEAR: 2700 (sum of Sales Amount for 2019 = Sales Amount YTD for 2019-12)
Sales Amount PY FULL YEAR: 2550 (sum of Sales Amount PY = Sales Amount YTD PY for 2019-12)
How can I achieve it?
I tried using ALL() function but then it calculate sum of all years not only for 2019.
Then I wanted to restrict and filter only 2019 data, but how can I get correct year (it should be the year from month slicer)? I can not hardcode it - I want to be able to select for example 2018-07, and so on...
Do you have any ideas?
Thanks,
Best regards,
S. (:
@Anonymous can you paste some data in text form?
Proud to be a Super User!
Please find below data in text format (:
Year | Month | Sales Amount | Sales Amount PY | Sales Amount YTD | Sales Amount YTD PY |
2018 | 1 | 150 | 200 | 150 | 200 |
2018 | 2 | 150 | 250 | 300 | 450 |
2018 | 3 | 250 | 150 | 550 | 600 |
2018 | 4 | 300 | 200 | 850 | 800 |
2018 | 5 | 150 | 300 | 1000 | 1100 |
2018 | 6 | 200 | 350 | 1200 | 1450 |
2018 | 7 | 250 | 250 | 1450 | 1700 |
2018 | 8 | 150 | 100 | 1600 | 1800 |
2018 | 9 | 250 | 100 | 1850 | 1900 |
2018 | 10 | 350 | 100 | 2200 | 2000 |
2018 | 11 | 500 | 200 | 2700 | 2200 |
2018 | 12 | 300 | 350 | 3000 | 2550 |
2019 | 1 | 100 | 150 | 100 | 150 |
2019 | 2 | 200 | 150 | 300 | 300 |
2019 | 3 | 150 | 250 | 450 | 550 |
2019 | 4 | 250 | 300 | 700 | 850 |
2019 | 5 | 300 | 150 | 1000 | 1000 |
2019 | 6 | 200 | 200 | 1200 | 1200 |
2019 | 7 | 100 | 250 | 1300 | 1450 |
2019 | 8 | 100 | 150 | 1400 | 1600 |
2019 | 9 | 200 | 250 | 1600 | 1850 |
2019 | 10 | 250 | 350 | 1850 | 2200 |
2019 | 11 | 350 | 500 | 2200 | 2700 |
2019 | 12 | 500 | 300 | 2700 | 3000 |
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 |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |