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
Anonymous
Not applicable

How to pick rows by groups with newest date in specific period of time

Hello,

 

Regarding table with data below, I would like to ask:

how I could create report table, where I could pick specifick period of time (for example 1/14/2020-1/20/2020) and then pick the newest rows regarding "Group" name? 

ProjectGroupGroup_statusDate
Mainmain_1grPassed1/11/2020
Mainmain_1grFailed1/13/2020
Mainmain_3grFailed1/14/2020
Mainmain_2grFailed1/15/2020
Mainmain_1grFailed1/16/2020
Mainmain_1grFailed1/19/2020
Syssys_1grFailed1/11/2020
Syssys_2grFailed1/13/2020
Syssys_1grPassed1/14/2020
Syssys_2grFailed1/15/2020
Syssys_2grFailed1/17/2020
v104v104_1grFailed1/14/2020
V104v104_1grPassed1/17/2020
v104v104_1grFailed1/18/2020
v20v20_1grFailed1/14/2020
v20v20_1grPassed1/20/2020
v20v20_1grFailed1/21/2020
v20v20_1grFailed1/22/2020
1 ACCEPTED SOLUTION
dustinn
Resolver I
Resolver I

Not really good at DAX but make a measure then that will serve as your table filter.

 

Measure1 =
VAR MaxDate =
CALCULATE (
MAX ( [Date] ),
ALLSELECTED ( 'Table'[Date], 'Table'[Group], 'Table'[Group_status] )
)
RETURN
CALCULATE ( MAX ( [Date] ), FILTER ( 'Table', [Date] = MaxDate ) )


i3rKGct

 

 

View solution in original post

3 REPLIES 3
dustinn
Resolver I
Resolver I

Not really good at DAX but make a measure then that will serve as your table filter.

 

Measure1 =
VAR MaxDate =
CALCULATE (
MAX ( [Date] ),
ALLSELECTED ( 'Table'[Date], 'Table'[Group], 'Table'[Group_status] )
)
RETURN
CALCULATE ( MAX ( [Date] ), FILTER ( 'Table', [Date] = MaxDate ) )


i3rKGct

 

 

Anonymous
Not applicable

Thank you, @dustinn  , your measure helped me! Only, I replaced 'Table'[Group] to 'Table'[Project].

amitchandak
Super User
Super User

create a measure like this and use in your visual

calculate(countrow(table),
	filter(summarize(table,table[Group],"_maxdt",max(table[date]),"_maxGp",max(table[Group])),
			table[Group]=[_maxGp] && max(table[date]=_maxdt)))

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

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