Forum Discussion
Anonymous
6 years agoNot applicable
Line graph and staff numbers
Hi all, I'm creating a line graph which is showing serveral measures across the day and how they trend by the hour. The labour hours are entered into an Excel spreadsheet showing date, start...
v-xuding-msft
Community Support
6 years agoHi Anonymous ,
Please create a time table firstly. And then try the measure to check if it works.
Measure =
VAR time1 =
CALCULATE (
MAX ( 'Table'[Time] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Line] IN FILTERS ( 'Table'[Line] ) )
)
VAR time2 =
CALCULATE (
MAX ( 'Table'[Time] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Time] < MIN ( 'Time'[Value] )
&& 'Table'[Line] IN FILTERS ( 'Table'[Line] )
)
)
RETURN
IF (
MIN ( 'Time'[Value] ) > time1,
CALCULATE (
SUM ( 'Table'[Staff] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Line] IN FILTERS ( 'Table'[Line] )
&& 'Table'[Time] = time2
)
),
SUM ( 'Table'[Staff] )
)
For more details, please see the attachment.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Thank you v-xuding-msft I wil try this.
- v-xuding-msft6 years ago
Community Support
Hi Anonymous ,
Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from here.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.