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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
rajasekar_o
Helper V
Helper V

ABSENT NAME LIST

i have employee master table and attendance table
If an employee does not have an "IN" entry in the inout column on the selected date, then display the list of names for absent employees

rajasekar_o_0-1706351827421.png 

rajasekar_o_1-1706351857153.png

 

 

2 ACCEPTED SOLUTIONS
speedramps
Super User
Super User

Download this solution ...
Click here to download PBIX from OneDrive 

 

How it works ...

 

Create a calendar table  from start to end date with no  missing dates.

Add a column to indicate which are working day and which are holidays 

otherwise everyone will be reported absent on those days

 

Create relationships exactly like this diagram

speedramps_0-1706354932342.png

 

Create a measure whic returns TRUE if there are no IN rows for the name and date for working days.

So excludes holidays and weekends

Absent on work day = 
IF(SELECTEDVALUE('Calendar'[IsWorkingDay]),
CALCULATE(
    ISEMPTY(Logfile),
    Logfile[Status] = "IN"
))

 

Use a matric visual

with Rows = Staff[Name]

with Colum = Calendar[Date]

with value = [Absent on work day]

take care to use correct table names andnot the logfile, otherwise it wont work

 

speedramps_1-1706355361933.png

 

Thanks for the clear description of the problem with example data.

Next time please provide the data as text and not a picture, so we can import the data.

Remember we are unpaid volunteers, and you have got free expert help which took a lot of effort,
This solution works and does exactly what you asked.
So please quickly click the [accept as solution] and the thumbs up button to leave kudos. 

One question per ticket please. If you need to change or extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

If you quote @speedramps in your next tickets then I will then receive an automatic notification, and will be delighted to help you again.

Please now click the [accept as solution] and the thumbs up button.  Thank you.

View solution in original post

v-weiyan1-msft
Community Support
Community Support

Hi @rajasekar_o ,

 

Based on your description,
here is the data I created from the sample you provided.
Employee table:

vweiyan1msft_0-1706700662953.png

Attendance table:

vweiyan1msft_1-1706700681866.png

Please try the following steps:
1.You can create a Calcualted table.

Table = VALUES('Attendance'[DATE])

vweiyan1msft_2-1706700718586.png

2. Use the following code to create a Measure.

Measure = 
VAR SelectedDate = SELECTEDVALUE ( 'Table'[DATE] )
RETURN
IF( SELECTEDVALUE('Employee'[ID]) IN 
                CALCULATETABLE (
                VALUES ( 'Attendance'[ID] ),
                'Attendance'[Date] = SelectedDate,
                'Attendance'[IN OUT] = "IN" ),
                0,
                1)

3. Select your visual object, put the measure in the “Filters on this visual" section, and filter it by “Measure is 1".

vweiyan1msft_3-1706701137443.png

The field of the slicer is from Table. When you select "3/20/2023" in the slicer, Result is as below.

vweiyan1msft_4-1706701157882.png


Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-weiyan1-msft
Community Support
Community Support

Hi @rajasekar_o ,

 

Based on your description,
here is the data I created from the sample you provided.
Employee table:

vweiyan1msft_0-1706700662953.png

Attendance table:

vweiyan1msft_1-1706700681866.png

Please try the following steps:
1.You can create a Calcualted table.

Table = VALUES('Attendance'[DATE])

vweiyan1msft_2-1706700718586.png

2. Use the following code to create a Measure.

Measure = 
VAR SelectedDate = SELECTEDVALUE ( 'Table'[DATE] )
RETURN
IF( SELECTEDVALUE('Employee'[ID]) IN 
                CALCULATETABLE (
                VALUES ( 'Attendance'[ID] ),
                'Attendance'[Date] = SelectedDate,
                'Attendance'[IN OUT] = "IN" ),
                0,
                1)

3. Select your visual object, put the measure in the “Filters on this visual" section, and filter it by “Measure is 1".

vweiyan1msft_3-1706701137443.png

The field of the slicer is from Table. When you select "3/20/2023" in the slicer, Result is as below.

vweiyan1msft_4-1706701157882.png


Best Regards,
Yulia Yan

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I provided a smimilare solution days ago but @rajasekar_o has not responded.

Please be polite and click "accept as solution" and thumbs up.

Rememnber we are unpaid volunteers and you may want free expert help again.

speedramps
Super User
Super User

@rajasekar_o please click the [accept as solution] and the thumbs up button. 

I have provide a example, screenshots and detailed explanation.

It does exactly what you asked for.

Thank you.

speedramps
Super User
Super User

Download this solution ...
Click here to download PBIX from OneDrive 

 

How it works ...

 

Create a calendar table  from start to end date with no  missing dates.

Add a column to indicate which are working day and which are holidays 

otherwise everyone will be reported absent on those days

 

Create relationships exactly like this diagram

speedramps_0-1706354932342.png

 

Create a measure whic returns TRUE if there are no IN rows for the name and date for working days.

So excludes holidays and weekends

Absent on work day = 
IF(SELECTEDVALUE('Calendar'[IsWorkingDay]),
CALCULATE(
    ISEMPTY(Logfile),
    Logfile[Status] = "IN"
))

 

Use a matric visual

with Rows = Staff[Name]

with Colum = Calendar[Date]

with value = [Absent on work day]

take care to use correct table names andnot the logfile, otherwise it wont work

 

speedramps_1-1706355361933.png

 

Thanks for the clear description of the problem with example data.

Next time please provide the data as text and not a picture, so we can import the data.

Remember we are unpaid volunteers, and you have got free expert help which took a lot of effort,
This solution works and does exactly what you asked.
So please quickly click the [accept as solution] and the thumbs up button to leave kudos. 

One question per ticket please. If you need to change or extend your request then please raise a new ticket.

You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

If you quote @speedramps in your next tickets then I will then receive an automatic notification, and will be delighted to help you again.

Please now click the [accept as solution] and the thumbs up button.  Thank you.

ok

please read my earlier post which has link

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors