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
jd8766
Helper II
Helper II

Get MIN and MAX time per user per day in table?

Hi, I have a table that looks like the below..

I want to show by each day, what the total number of calls was by user, and also the FIRST and LAST time a call was made per user.

jd8766_0-1670499063140.png
My ideal output would be the below..

jd8766_1-1670499164238.png



I have tried the MAX and MIN functions but they return the MAX time in my entire time dimension.. which isn't what I wanted. Any ideas how I can achieve the below?



 

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

Hi @jd8766

 

You can achieve this directly by using MIN and MAX:

 

MINTime = MIN('Table'[Time])
MaxTime = MAX('Table'[Time])

 

 

Then change the Format of the measures:

vjianbolimsft_1-1672820494289.png

Output:

vjianbolimsft_0-1672820407486.png

If your data is more complex, please try:

 

First Time = CALCULATE(MIN('Table'[Time]),FILTER(ALL('Table'),[Date]=MAX('Table'[Date])&&[User]=MAX('Table'[User])))
Last Time = CALCULATE(MAX('Table'[Time]),FILTER(ALL('Table'),[User]=MAX('Table'[User])&&[Date]=MAX('Table'[Date])))

 

 

Output:

vjianbolimsft_2-1672820601792.png

If you need calculated column:

 

FIRSTTIME = CALCULATE(MIN('Table'[Time]),FILTER('Table',[User]=EARLIER('Table'[User])&&[Date]=EARLIER('Table'[Date])))
LASTTIME = CALCULATE(MAX('Table'[Time]),FILTER('Table',[User]=EARLIER('Table'[User])&&[Date]=EARLIER('Table'[Date])))

 

 

Output:

vjianbolimsft_3-1672820970080.png

If you need a table:

 

Table 2 =
SUMMARIZE (
    'Table',
    'Table'[User],
    'Table'[Date],
    "Total Call",
            SUM ( 'Table'[Calls] ),
    "First Time",
            MIN ( 'Table'[Time] ),
    "Last Time",
            MAX ( 'Table'[Time] )
)

 

 

Output:

 vjianbolimsft_0-1672821233686.png

Best Regards,

Jianbo Li

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

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @jd8766

 

You can achieve this directly by using MIN and MAX:

 

MINTime = MIN('Table'[Time])
MaxTime = MAX('Table'[Time])

 

 

Then change the Format of the measures:

vjianbolimsft_1-1672820494289.png

Output:

vjianbolimsft_0-1672820407486.png

If your data is more complex, please try:

 

First Time = CALCULATE(MIN('Table'[Time]),FILTER(ALL('Table'),[Date]=MAX('Table'[Date])&&[User]=MAX('Table'[User])))
Last Time = CALCULATE(MAX('Table'[Time]),FILTER(ALL('Table'),[User]=MAX('Table'[User])&&[Date]=MAX('Table'[Date])))

 

 

Output:

vjianbolimsft_2-1672820601792.png

If you need calculated column:

 

FIRSTTIME = CALCULATE(MIN('Table'[Time]),FILTER('Table',[User]=EARLIER('Table'[User])&&[Date]=EARLIER('Table'[Date])))
LASTTIME = CALCULATE(MAX('Table'[Time]),FILTER('Table',[User]=EARLIER('Table'[User])&&[Date]=EARLIER('Table'[Date])))

 

 

Output:

vjianbolimsft_3-1672820970080.png

If you need a table:

 

Table 2 =
SUMMARIZE (
    'Table',
    'Table'[User],
    'Table'[Date],
    "Total Call",
            SUM ( 'Table'[Calls] ),
    "First Time",
            MIN ( 'Table'[Time] ),
    "Last Time",
            MAX ( 'Table'[Time] )
)

 

 

Output:

 vjianbolimsft_0-1672821233686.png

Best Regards,

Jianbo Li

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

@jd8766 , If you create min/max measure thtat will work

 

max(Table[time])

 

min(Table[time]) 

 

 

if you need a column

 

minx(filter(Table, [User] = earlier([User]) ),[Time])

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

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