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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Limiting rows in dataset through grouping or indexing

Hello,

 

I have a dataset where I am getting multiple rows for a combination of attributes for different dates. I want to filter the rows based on maximum date for the selected attributes. Here is the dataset example and what I am looking for. 

 

TestNameMetricLatestBatchWeekIDSource ValueTarget ValueExecution Date
Test1A202007231120w19200501000023/07/2020
Test1A202008051029w19200530031003/08/2020
Test1A202007291135w192005240020029/07/2020

 

Expected Output:-

Flag is the column I want in dataset and it would be great if this can come through a measure rather than calculated column.

 

TestNameMetricLatestBatchWeekIDSource ValueTarget ValueExecution DateFlag
Test1A202007231120w19200501000023/07/20200
Test1A202008051029w19200530031003/08/20201
Test1A202007291135w192005240020029/07/20200

 

Thanks.

 

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , on what bases Date needs to be selected is not clear. Can you please explain with an example. 

 

See example

if(Max(Table[Execution])= calculate(max(Table[Execution]), allexcept(Table[TestName])), "Yes","No")

 

Appreciate your Kudos.

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

@amitchandak 

 

Can you please modify this to All instead of AllExcept. I have added this to report but it looks like it is working on the remaining grouping except TestName & WeekID while I want it to work only for this grouping. Adding any more attributes in the grid should not change the result. When I try All in the same formula, I get an error - "Multiple table arguments are not allowed in the ALL/ALLNOBLANKROW function."

Anonymous
Not applicable

@amitchandak 

 

Thanks for quick reply, I will try it out. 

 

I need the grouping on TestName and WeekID and find max Execution Date rows.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.