Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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 in hrs is calculated from two columns 'Start_date' & end_date' which are the dates of leaves taken. I converted the number of leaves take(in days) to Hours.
Hrs_worked = hrs_per_month - Leaves in Hrs
Hrs_worked is a column. The issue is I can't get the Hrs_worked right where there is more than one 'Leaves in hrs' (hrs worked in blue are expected hours_worked).
Please suggest how can I get the right Hours_worked.
My pbi: https://1drv.ms/u/s!Ag919_pO_UKrgRJuluqNoYvl-Zba?e=NynFhy
TIA
Solved! Go to Solution.
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
)
)
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
)
)
User | Count |
---|---|
66 | |
61 | |
47 | |
33 | |
32 |
User | Count |
---|---|
87 | |
72 | |
56 | |
49 | |
45 |