Forum Discussion
Anonymous
5 years agoNot applicable
Issue with Column Dax
Hi Community, I need a small & quick help, its probably something too simple. My matrix on the report looks like following: I have a calender table that is linked to my data table: Leaves...
- Anonymous5 years ago
Hi Anonymous
Try it
Hours worked = VAR Curemp = HASI_Wrkhrs[emp_code] VAR CurMonth = MONTH ( HASI_Wrkhrs[date_start] ) RETURN HASI_Wrkhrs[Hrs per month] - CALCULATE ( SUM ( HASI_Wrkhrs[Leaves in hrs] ), FILTER ( HASI_Wrkhrs, HASI_Wrkhrs[emp_code] = Curemp && MONTH ( HASI_Wrkhrs[date_start] ) = CurMonth ) )
Anonymous
5 years agoNot applicable
Hi Anonymous
Try it
Hours worked =
VAR Curemp = HASI_Wrkhrs[emp_code]
VAR CurMonth =
MONTH ( HASI_Wrkhrs[date_start] )
RETURN
HASI_Wrkhrs[Hrs per month]
- CALCULATE (
SUM ( HASI_Wrkhrs[Leaves in hrs] ),
FILTER (
HASI_Wrkhrs,
HASI_Wrkhrs[emp_code] = Curemp
&& MONTH ( HASI_Wrkhrs[date_start] ) = CurMonth
)
)