cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
subhashree_r Frequent Visitor
Frequent Visitor

M query to find do group by and remove min of year data row

Hey people,

   given below is the screenshot of my data set 

Capture 2.PNG

I want to eliminate The rows that are minimun year corresponding to the store in m query. Can anyone guide me through the problem guys 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: M query to find do group by and remove min of year data row

@subhashree_r ,

 

Duplicate the table, group the min year by store in the duplicated table:

1.PNG 

 

Then merge the original table and duplicated table based on store and year column using left anti join, remove the useless columns and you will achieve the result:

2.PNG 

 

You can also refer to the pbix file.

 

Community Support Team _ Jimmy Tao

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

1 REPLY 1
Community Support Team
Community Support Team

Re: M query to find do group by and remove min of year data row

@subhashree_r ,

 

Duplicate the table, group the min year by store in the duplicated table:

1.PNG 

 

Then merge the original table and duplicated table based on store and year column using left anti join, remove the useless columns and you will achieve the result:

2.PNG 

 

You can also refer to the pbix file.

 

Community Support Team _ Jimmy Tao

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

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)