Forum Discussion
SumX for specific dates
Hi,
I have data loaded in the PowerBi from 2021 to 2026. However, I want the calculations (Sumx and Cumulative) to be done for only 2022 data. I tried using datesbetween with sumx, but it is calculating just one value- summation for 2022 figures. I am unable to slice it on a monthly basis.
For example, in the pic below, I want actuals-2 to start from 27,595,208 and should end at 31st Dec 2022 figure.
Thank you so much.
- Anonymous4 years ago
I have created a new table by using- calculatetable and datesbetween functions (to filter out only 2022 data).
Then, I have used this table in my measures to get the desired result.
3 Replies
- danextianSuper User
Hi Anonymous,
Can you please post a sample data that we can copy paste and your expected result? Also, why use SUMX and not a regular SUM?
Please refer to this on how the community can help you better - https://community.powerbi.com/t5/Desktop/bd-p/power-bi-designer - Ashish_MathurSuper User
Hi,
What result are you expecting in the Actuals-2 column? Please also share the download link of the PBI file.
- AnonymousNot applicable
I have created a new table by using- calculatetable and datesbetween functions (to filter out only 2022 data).
Then, I have used this table in my measures to get the desired result.