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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Max value with multiple criteria

Hi All,

 

I have a table like below. I want to get the maximum value from the same grid and within the same week, but the expected result that the value displayed in the max value column is IP Name. Grid's name is very unique.

 

WeekGridIP NameValueMax Grid
1HA4A
1IA3A
1JC1A
1JA4A
1JB3A
1KC5C
1KA4C
2LD1A
2LC2A
2LA4A
2ME5E

 

 

Any help would be great. Ready to share my data and/or pbix file if needed.

Thanks

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Assuming you need the last column

 

Create a new column

 

max Grid =
var _max = maxx(filter(Table,[Week] = earlier([Week]) && [Grid] = earlier([Grid])),[value])
return
maxx(filter(Table,[Week] = earlier([Week]) && [Grid] = earlier([Grid]) && [value] =_max ),[ IP Name])

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Assuming you need the last column

 

Create a new column

 

max Grid =
var _max = maxx(filter(Table,[Week] = earlier([Week]) && [Grid] = earlier([Grid])),[value])
return
maxx(filter(Table,[Week] = earlier([Week]) && [Grid] = earlier([Grid]) && [value] =_max ),[ IP Name])

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

Hi @

 

Will you help again? What if I put another filter in the EXP column, where if the value "BB" is found, that value will be excluded. So the results obtained in the column "new max grid" are as follows :

 

WeekGridIP NameValueExpMax GridNew Max Grid
1HA4AAAA
1IA3AAAA
1JC1AAAB
1JA4BBAB
1JB3AAAB
1KC5AACC
1KA4AACC
2LD1AAAC
2LC2AAAC
2LA4BBAC
2ME5AAEE

 

Thanks

Anonymous
Not applicable

Hi @amitchandak

 

Thanks for your helping me.

 

How about lookupvalue? is it possible to use it?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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