Forum Discussion
Login DATE Based leave calculation
- Anonymous2 years ago
Thanks for the reply from bhanu_gautam , please allow me to provide another insight:
Hi, rajasekar_o
Regarding the issue you raised, my solution is as follows:
1. Below are the measure I've created for your needs:
Leave count = VAR ID1 = CALCULATETABLE ( VALUES ( 'login'[EMPID] ), ALLSELECTED ( 'login' ) ) VAR cc1 = CALCULATE ( COUNT ( Employee[DEPT] ), FILTER ( 'Employee', NOT ( 'Employee'[EMPID] IN ID1 ) ) ) RETURN IF ( ISFILTERED ( 'login'[LOGIN DATE] ), IF ( ISBLANK ( cc1 ), 0, cc1 ), 0 )Login = VAR ID2 = CALCULATETABLE ( VALUES ( 'login'[EMPID] ), ALLSELECTED ( 'login' ) ) RETURN IF ( ISFILTERED ( 'login'[LOGIN DATE] ), IF ( NOT ( MAX ( 'Employee'[EMPID] ) IN ID2 ), "Leave", BLANK () ), BLANK () )2.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bhanu_gautam
I try not working.
can you please share the application
Thanks for the reply from bhanu_gautam , please allow me to provide another insight:
Hi, rajasekar_o
Regarding the issue you raised, my solution is as follows:
1. Below are the measure I've created for your needs:
Leave count =
VAR ID1 =
CALCULATETABLE ( VALUES ( 'login'[EMPID] ), ALLSELECTED ( 'login' ) )
VAR cc1 =
CALCULATE (
COUNT ( Employee[DEPT] ),
FILTER ( 'Employee', NOT ( 'Employee'[EMPID] IN ID1 ) )
)
RETURN
IF (
ISFILTERED ( 'login'[LOGIN DATE] ),
IF ( ISBLANK ( cc1 ), 0, cc1 ),
0
)Login =
VAR ID2 =
CALCULATETABLE ( VALUES ( 'login'[EMPID] ), ALLSELECTED ( 'login' ) )
RETURN
IF (
ISFILTERED ( 'login'[LOGIN DATE] ),
IF ( NOT ( MAX ( 'Employee'[EMPID] ) IN ID2 ), "Leave", BLANK () ),
BLANK ()
)
2.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.