Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I think the best solution to my problem is to create a running total column for a table. I need to sum hours by employee for continous dates. I'll then be using the numbers in that column do do further filtering.
Below is an example of my data:
Each time there is a gap in the date sequence for an employee, I need the running total to start over on summing the hours.
@mvgust , apparently, [Timecard ID] column already bins the table by consecutive days, thus you can authored a formula for calculated column like this,
Running Total =
SUMX (
CALCULATETABLE (
Data,
ALLEXCEPT ( Data, Data[Timecard ID], Data[Employee ID] ),
Data[date] <= EARLIER ( Data[date] )
),
Data[Hours]
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
While my table has timecard ID I can't use this as part of my context as we're looking at consecutive days regardless of what timecard the days fall into.
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |