Forum Discussion
NKD
1 year agoFrequent Visitor
Difference between measure and total
Hello, I'm having a weird result and got no idea why. I have a sales table with a calendar date, a calendar table with 1-* simple relationship. These are the fields: Chiffre d'Affaires = sum(...
- 1 year ago
Hi NKD
Assuming today's date doesnt' necessarily mean today but the latest date with data in your semantic model, try this:
Cumulative LY with a stop = VAR _lastdate = CALCULATE ( LASTNONBLANK ( CalendarTable[Date], [Sales Amount] ), ALLSELECTED ( CalendarTable ) ) RETURN CALCULATE ( CALCULATE ( [Cumulative CY], SAMEPERIODLASTYEAR ( CalendarTable[Date] ) ), KEEPFILTERS ( CalendarTable[Date] <= _lastdate ) )Please see the attached pbix.
ChielFaber
Super User
1 year agoThis is a fairly common problem. Check out the usefull video:
https://www.youtube.com/watch?v=yw0QHu9V4UQ