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.
Hi,
My data set looks similar to this:
This means I can quite easily show starters and leavers per month (both in terms of headcount and hours), and therefore net change. However, I am now thinking of a way to show a cumulative over time, i.e.:
Any tips on how to model it? What formulas/tables/columns should I be creating? Thanks for all suggestions!
Solved! Go to Solution.
Hi @redhughes,
You can try to use following measure, I added new conditions on leave date to prevent dax formula calculated on leave employees.
Measure = CALCULATE ( SUM ( 'Table'[Hours] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Start Date] <= MAX ( 'Table'[Start Date] ) && OR ( [Leave date] = BLANK (), [Leave date] >= MAX ( Table[Start Date] ) ) ) )
Regards,
Xiaoxin Sheng
You can use a formula like the following one:
Cumulative = CALCULATE ( SUM ( 'Table'[Hours] ), FILTER( ALL ('Table' ), 'Table'[Start Date] <= MAX( 'Table'[Start Date] )) )
See also workspace on this link
thanks @themistoklis, unfortunately this measure doesn't take into account leavers so it keeps adding hours on and on disregarding the fact that someone might have left (and would therefore reduce the number of cumulative hours)
Hi @redhughes,
You can try to use following measure, I added new conditions on leave date to prevent dax formula calculated on leave employees.
Measure = CALCULATE ( SUM ( 'Table'[Hours] ), FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Start Date] <= MAX ( 'Table'[Start Date] ) && OR ( [Leave date] = BLANK (), [Leave date] >= MAX ( Table[Start Date] ) ) ) )
Regards,
Xiaoxin Sheng
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |