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! Request now

Reply
bangerasid
Helper I
Helper I

DAX - Help Needed (row level check)

Hi Team,

 

I have the below scenario.

 

bangerasid_0-1656419503139.png

I am trying to create the master table based on End of Week & Attendance tables.

However, when I am doing this, i want to consider the Date of Joining as well.

I am unable to figure out a dax for the same.
Basically, i want to check
if(date of joining < end of week then "Present/Absent" else "blank"),

I will then remove all the records having blank values as the result.

 

@tamerj1 @truptis @Vijay_A_Verma @SpartaBI @amitchandak @Ashish_Mathur @Greg_Deckler 

1 ACCEPTED SOLUTION

Hi,

You may download the solution workbook from here.  I have used the Query Editor in MS Excel to solve the question.  Implement the same steps in PowerBI Desktop.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

8 REPLIES 8
Ashish_Mathur
Super User
Super User

You should have a proper date column i.e. without the ordinals such as rd, th.  Share data in a format that i can paste into MS Excel with my suggested change.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

End of Week
11/06/2022
18/06/2022
25/06/2022

 

 

IDEOWHire Date
1018/06/202213/06/2022
1025/06/202213/06/2022

 

Hi,

You may download the solution workbook from here.  I have used the Query Editor in MS Excel to solve the question.  Implement the same steps in PowerBI Desktop.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Thanks for the response. I want to do it at DAX level and not at power query, reason being the dataset is huge, for each ID there are around 10k rows.

I am just trying to compare if(joined on > end of week, "Exclude", "Include").
However, to do this, I am not able to get the end of week value in the highlighted area.

values are coming for all the fields except for when the student has no attendance.

 

Used the below formula.
m_endofweek measure = VALUES(Weeks[End of Week])

 

bangerasid_0-1657715674734.png

 

 

Hi,

Write this measure

=if(max(Data[Joined On])>max(Data[End of week]),"Exclude","Include")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I am getting the following output, however, the expected output should have "Exclude" in place of "Include" at the highlighted cell.

bangerasid_0-1656501839406.png

 

 

amitchandak
Super User
Super User

@bangerasid , merge using left join EOW and end of week in power query

 

and then add a custom column in the power query

 

if [Date of joining] < [End of week] then "Present"

 


Merge : https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks for replying.

Merging wont fetch the missing week for each student right? 
Let me know if there is a way to get the missing week for every student using join.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors