Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi there,
I am building a time attendance sheet by using data from access server. I have a coloumn in a table where I have all the instances when a employee left or entered the building during a date range.
But I want to get first and last enteries on a particular day. Can anyone help me with achieving that ?
@amitchandak , thanks for your reply.. I think that's for a record that has mutliple enteries for just one day. In my case, I have a table where I have multiple enteries for a date range.. Please check the picture
HI @raionkar ,
You can add a column to the stored date part of EVTime, then write a measure to calculate first/last DateTime based on current date group. After these steps, you can create a table visual with date as category and measure as detail value to display corresponding records.
EVDate =
DATEVALUE ( Table[EVTime] )
Measure =
VAR current =
SELECTEDVALUE ( Table[EVTime] )
VAR _min =
CALCULATE (
MIN ( Table[EVTime] ),
FILTER ( ALLSELECTED ( Table ), [EnterArea] = 1 ),
VALUES ( Table[EVDate] )
)
VAR _max =
CALCULATE (
MAX ( Table[EVTime] ),
FILTER ( ALLSELECTED ( Table ), [ExitArea] = 1 ),
VALUES ( Table[EVDate] )
)
RETURN
IF ( current IN { _min, _max }, current )
Regards,
Xiaoxin Sheng
Hello @Anonymous ,
I am getting a syntax error when I type in the forumla for var. I am using PowerBI desktop.
HI @raionkar ,
Can you please share the detail error message with a snapshot?
BTW, I share two formulas: calculated column and measure, please not use them in the same calculated filed. ('EVDate' is calculated column and 'measure' is measure)
Regards,
Xiaoxin Sheng
There is an option. use summarize. There you can take min and max time.
https://docs.microsoft.com/en-us/dax/summarize-function-dax
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.