Forum Discussion
BBASARAN
6 years agoRegular Visitor
ABSENTEEISM TREND
I need to show the plant historical absenteeism trend in bar w/ illness etc. breakdown. Below, I've put a simple table, actually my data has more coloumns. For example - Janury 1st, value of bar ch...
- 6 years ago
Hi, BBASARAN
You may modify the measure as below.
Absent Num = var _date = SELECTEDVALUE('Calendar'[Date]) var tab = SUMMARIZE( 'Table', 'Table'[Employee Name], 'Table'[ABS Start Time], 'Table'[ABS End Time], 'Table'[Illness], "flag", var _starttime = 'Table'[ABS Start Time] var _endtime = 'Table'[ABS End Time] return IF( _date>=_starttime&&_date<=_endtime, 1, 0 ) ) return CALCULATE( DISTINCTCOUNT('Table'[Employee Name]), FILTER( tab, [flag] = 1 ) )Then you can use 'Stacked column chart' to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-alq-msft
Community Support
6 years agoHi, BBASARAN
You may modify the measure as below.
Absent Num =
var _date = SELECTEDVALUE('Calendar'[Date])
var tab =
SUMMARIZE(
'Table',
'Table'[Employee Name],
'Table'[ABS Start Time],
'Table'[ABS End Time],
'Table'[Illness],
"flag",
var _starttime = 'Table'[ABS Start Time]
var _endtime = 'Table'[ABS End Time]
return
IF(
_date>=_starttime&&_date<=_endtime,
1,
0
)
)
return
CALCULATE(
DISTINCTCOUNT('Table'[Employee Name]),
FILTER(
tab,
[flag] = 1
)
)
Then you can use 'Stacked column chart' to display the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BBASARAN
6 years agoRegular Visitor
it works. Thank you for your reply.
Is there a way to sum that measure between 2 given dates?