Forum Discussion

rajasekar_o's avatar
rajasekar_o
Helper V
2 years ago
Solved

login date based leave

hi,team
Login date based leave calculation  heare all day are working day
Employee

EMPIDNAMEDEPT
EMPS001KUMARaccounts
EMPS002RAMIT
EMPJ003VANITESTING
EMP030THAMOaccounts
EMP032VINOTHIT

 

login 

EMPIDLOGIN DATETIMESHIFT
EMPS00101-04-20246:00 AM1
EMPS00201-04-20246:00 AM1
EMPJ00301-04-20246:00 AM1
EMP03001-04-20246:00 AM1
EMPS00102-04-20246:00 AM1
EMPS00202-04-20246:00 AM1
EMP03002-04-20246:00 AM1



expected output
if i filter the date 1/4/2024
Department wise leave

 

if i filter the date 2/4/2024
Department wise leave

employee wise leave details with
if i filter the date 1/4/2024



if i filter the date 2/4/2024

 

  • Hi rajasekar_o ,

     

    You can achieve your required output in several different ways and one of them is as follows:

    Leaves = [Countrows of employees]-distinctcount('Login data'[EMPID])

    Next, identify 'Leave' where the Leave measure returns a value of 1.

    Employee Leave = if([Leaves]=1,"Leave",blank())

    The output is shown below:

    I have attached a sample pbix file.

     

     

1 Reply

  • Hi rajasekar_o ,

     

    You can achieve your required output in several different ways and one of them is as follows:

    Leaves = [Countrows of employees]-distinctcount('Login data'[EMPID])

    Next, identify 'Leave' where the Leave measure returns a value of 1.

    Employee Leave = if([Leaves]=1,"Leave",blank())

    The output is shown below:

    I have attached a sample pbix file.