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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.