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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

MAXX in M Function

Hi folks,

I`m trying to ADD a TRUE of FALSE column based on two columns with PowerQuery Functions: 1.PNG

 

It`s in DAX =IF('Projetos em Andamento'[Id]=MAXX(FILTER('Projetos em Andamento';'Projetos em Andamento'[Project Name (Jira)]=EARLIER('Projetos em Andamento'[Project Name (Jira)]));'Projetos em Andamento'[Id]);TRUE())

But i need it in M (PowerQuery).

Please help me!!!

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

So you want a TRUE value for the highest ID per Project Name?

Duplicate the query.

Do a Group By-> using Project Name and MAX on the ID.

This will give you a table with the highest id for each project

project name    id

Squad                7

Portal                 9

......

Add a custom column "TRUE"

 

Merge this table with the original table using a Left Join (from the original)

This will get you:

 

highestID.PNG

 

then you replace the null values with FALSE

View solution in original post

1 REPLY 1
HotChilli
Super User
Super User

So you want a TRUE value for the highest ID per Project Name?

Duplicate the query.

Do a Group By-> using Project Name and MAX on the ID.

This will give you a table with the highest id for each project

project name    id

Squad                7

Portal                 9

......

Add a custom column "TRUE"

 

Merge this table with the original table using a Left Join (from the original)

This will get you:

 

highestID.PNG

 

then you replace the null values with FALSE

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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