Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hey everyone,
I'm using PowerBI to create an aging report. I use two measures, one that calculates aging as of a given date, and another measure that calculates aging based on the last day of the last month. When I run both these measures giving the same date, the value is drastically different. Am I doing something wrong?
Solved! Go to Solution.
If you give them the same date, the first measure will evaluate variable LastDay as that date, while the second measure will evaluate it as the date of the end of the previous month. So if the context of KeyDate[Date] only contains 15/01/2020, then the first measure will have VAR LastDay = 15/01/2020 and the second measure will have VAR LastDay = 31-12-2019.
In another case, if the context of KeyDate[Date] only contains 30/11/2019, then the first measure will have VAR LastDay = 30/11/2019 and the second measure will have VAR LastDay = 31-10-2019. (becasue of the -1 in your VAR statement).
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
Proud to be a Super User!
If you give them the same date, the first measure will evaluate variable LastDay as that date, while the second measure will evaluate it as the date of the end of the previous month. So if the context of KeyDate[Date] only contains 15/01/2020, then the first measure will have VAR LastDay = 15/01/2020 and the second measure will have VAR LastDay = 31-12-2019.
In another case, if the context of KeyDate[Date] only contains 30/11/2019, then the first measure will have VAR LastDay = 30/11/2019 and the second measure will have VAR LastDay = 31-10-2019. (becasue of the -1 in your VAR statement).
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
Proud to be a Super User!
User | Count |
---|---|
41 | |
27 | |
23 | |
19 | |
16 |
User | Count |
---|---|
54 | |
35 | |
19 | |
19 | |
15 |