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
GyMpX
Frequent Visitor

Group and Subgroup MAXX function calculate table

Hello everybody!

I need some help please:

I have a table with a few columns and I want to make a mesure with the sum of 2 columns, and the maximum of one of them. All this need to be filter by the other column: Look at my example: I have the first table and i want to get the 2nd one. If I Change the filter date, I want my second table refresh.

GyMpX_0-1668514596592.png

I have a good track, but my filter date is desactivate with it: 

 

Max nb ZONE = calculate(
maxx(
groupby('Fichiers','Fichiers'[Zone],'Fichiers'[produit],"somme",SUMX(CURRENTGROUP(),'Fichiers'[nombre])
,[somme])
,ALLEXCEPT('Fichiers','Fichiers'[Zone]))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @GyMpX ,

 

We can create measures in new table [Filtre Date].

 

Nb1 =

SUM(Fichiers[nombre])
MAX NB Zone1 = 

var _table=SUMMARIZE(ALLSelected('Fichiers'),Fichiers[zone],'Fichiers'[Produit],"Nb",[Nb1])

return

MAXX(FILTER(_table,[zone]=MAX('Fichiers'[zone])),[Nb])

 

Then the result is as follows.

vtangjiemsft_0-1668673000985.pngvtangjiemsft_1-1668673015674.png

 

Best Regards,

Neeko Tang

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

5 REPLIES 5
GyMpX
Frequent Visitor

Ohh!!! It's fantastic! It's work!!!!!!! You are a genus, Thank you a lot! 

Anonymous
Not applicable

Hi @GyMpX ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a table.

 

Filtre Date =

var _table=

SUMMARIZE('Fichiers',Fichiers[zone],Fichiers[Produit],"Nb",SUM(Fichiers[nombre]))

return

ADDCOLUMNS(_table,"MAX NB Zone",MAXX(FILTER(_table,[zone]=EARLIER([zone])),[Nb]))

 

(3) Then the result is as follows.

vtangjiemsft_0-1668588256845.png

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Thank you a lot for your answer!

But i have always a problem if i want to add a filter on the date (which is present in my first table). I prefer create a measure. and I think A little thing miss in my request.

Anonymous
Not applicable

Hi @GyMpX ,

 

We can create measures in new table [Filtre Date].

 

Nb1 =

SUM(Fichiers[nombre])
MAX NB Zone1 = 

var _table=SUMMARIZE(ALLSelected('Fichiers'),Fichiers[zone],'Fichiers'[Produit],"Nb",[Nb1])

return

MAXX(FILTER(_table,[zone]=MAX('Fichiers'[zone])),[Nb])

 

Then the result is as follows.

vtangjiemsft_0-1668673000985.pngvtangjiemsft_1-1668673015674.png

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

GyMpX
Frequent Visitor

In the second table, i would like to make Produit and not Expert sorry

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.