Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
42 | |
21 | |
21 | |
14 | |
14 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |