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.
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 |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |