Forum Discussion
Anonymous
5 years agoNot applicable
DAX: Cummulative count per hour
Hi PBIX community, I'm looking to show cummulative count in a table. The cummulative count works fine until 11PM but then it kind of goes awry. I have date and hour table as dimentions. Date and hou...
- 5 years ago
Anonymous ,
I'm not sure this is the best implementation since I'm not aware about your real model and all the prerequisites, but you can try this option:
Cummulative Eq Assign_2 = VAR currentDate = MAX ( d_DateTable[Date] ) VAR currentTime = MAX ( d_HourTable[Hour of Day] ) VAR prevDayValue = IF ( ISINSCOPE ( d_DateTable[Date] ), CALCULATE ( [EqAssignPerHour], FILTER ( ALL ( d_DateTable[Date] ), d_DateTable[Date] < currentDate ), ALL ( d_HourTable[Hour of Day] ) ) ) VAR c_amt = CALCULATE ( [EqAssignPerHour], FILTER ( ALL ( d_HourTable[Hour of Day] ), d_HourTable[Hour of Day] <= currentTime ) ) RETURN IF ( NOT ISBLANK ( [EqAssignPerHour] ), prevDayValue + c_amt )If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
ERD Thanks very much again! learning a lot from you. Cheers!