Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
rajasekar_o
Helper V
Helper V

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

rajasekar_o_0-1725443394255.png 

if i filter the date 2/4/2024
Department wise leave
rajasekar_o_1-1725443408137.png

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

rajasekar_o_2-1725444112783.png

if i filter the date 2/4/2024

rajasekar_o_3-1725444154569.png

 

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

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:

DataNinja777_0-1725543418750.png

I have attached a sample pbix file.

 

 

View solution in original post

1 REPLY 1
DataNinja777
Super User
Super User

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:

DataNinja777_0-1725543418750.png

I have attached a sample pbix file.

 

 

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.