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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
rajasekar_o
Helper V
Helper V

Name list of absent

 

id

name 
101RAJA
102RAM
103KUMAR
104JOHN
105JOTHI
106VIMALA

login data

IDDATEIN OUT
10120-03-2023IN
10121-03-2023IN
10220-03-2023IN
10220-03-2023 
10321-03-2023IN 
   

i need help,
i want name list of absent,
if the employee dont have "IN" in ( login data in out column)  then emloyee absent 
i tryd but not get correct answer 
empmaster data

1 ACCEPTED SOLUTION
v-nuoc-msft
Community Support
Community Support

Hi @rajasekar_o

 

@amitchandak Good share!

 

I have provided other ways to solve this problem, please try the following operations:

 

Here's some dummy data

 

"login data"

vnuocmsft_0-1706595855009.png

 

"Table"

vnuocmsft_1-1706595873811.png

 

Create a measure. Determine whether there is an absence in the record:

 

IN_OUT = 
    IF(
        SELECTEDVALUE('login data'[IN OUT]) <> "IN", 
        1, 
        0
    )

 

 

vnuocmsft_2-1706596036479.png

Create a measure. Find the list of absentees:

 

Name = 
var _id = 
    CALCULATE(
        SUM('Table'[id]), 
        FILTER(
            ALL('login data'), 
            [IN_OUT] = 1
        )
    )
RETURN 
    CALCULATE(
        MAX('Table'[name]), 
        FILTER(
            'Table',
        'Table'[id] = _id
        )
    )

 

 

Here is the result:

vnuocmsft_3-1706596210052.png

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

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

3 REPLIES 3
v-nuoc-msft
Community Support
Community Support

Hi @rajasekar_o 

 

If my answer is correct, please mark it as accept as solution.

 

Regards,

Nono Chen

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

v-nuoc-msft
Community Support
Community Support

Hi @rajasekar_o

 

@amitchandak Good share!

 

I have provided other ways to solve this problem, please try the following operations:

 

Here's some dummy data

 

"login data"

vnuocmsft_0-1706595855009.png

 

"Table"

vnuocmsft_1-1706595873811.png

 

Create a measure. Determine whether there is an absence in the record:

 

IN_OUT = 
    IF(
        SELECTEDVALUE('login data'[IN OUT]) <> "IN", 
        1, 
        0
    )

 

 

vnuocmsft_2-1706596036479.png

Create a measure. Find the list of absentees:

 

Name = 
var _id = 
    CALCULATE(
        SUM('Table'[id]), 
        FILTER(
            ALL('login data'), 
            [IN_OUT] = 1
        )
    )
RETURN 
    CALCULATE(
        MAX('Table'[name]), 
        FILTER(
            'Table',
        'Table'[id] = _id
        )
    )

 

 

Here is the result:

vnuocmsft_3-1706596210052.png

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

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

amitchandak
Super User
Super User

@rajasekar_o , Please find the attached file after signature,

 

amitchandak_0-1706515160558.png

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.