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
GregMeskens
New Member

Max function in multiple sheets

Dear all,

 

I have a large amount of files consolidated in power bi. I would like in query editor to return the max value of a column per period. So max value in column 3 per item/period.

 

I cannot make a good function in DAX quite new to it. Any easy suggestions?Much appreciated.

   
Column 1Column 2Column 3
Period 1Item 1Value 1
Period 2Item 1 Value 2
Period 3Item 1Value 3
Period 4Item 1Value 4
Period 5Item 1Value 5
Period 6Item 1Value 6
Period 7Item 1Value 7
Period 1Item 2Value 1
Period 2Item 2Value 2
Period 3Item 2Value 3
Period 4Item 2Value 4
Period 5Item 2Value 5
Period 6Item 2Value 6
Period 7Item 2Value 7
1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @GregMeskens,

 

In addition, if you want to add a column to your table to get the max value of a column per period/item, then the the formulas(DAX) below should work in this scenario. Smiley Happy

Column = CALCULATE(MAX(Table1[Column 3]),ALLEXCEPT(Table1,Table1[Column 1]))

or

Column = CALCULATE(MAX(Table1[Column 3]),ALLEXCEPT(Table1,Table1[Column 2]))

Note: just replace "Table1" with your real table name.

 

c4.PNG

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @GregMeskens,

 

In addition, if you want to add a column to your table to get the max value of a column per period/item, then the the formulas(DAX) below should work in this scenario. Smiley Happy

Column = CALCULATE(MAX(Table1[Column 3]),ALLEXCEPT(Table1,Table1[Column 1]))

or

Column = CALCULATE(MAX(Table1[Column 3]),ALLEXCEPT(Table1,Table1[Column 2]))

Note: just replace "Table1" with your real table name.

 

c4.PNG

 

Regards

MFelix
Super User
Super User

Hi @GregMeskens,

 

Don't know if you need to have the max used in another calculations/visuals but if you are just looking for the max to put in a table as you show in your image you can add the 3 columns to the Table visual and for value select the MAX this will give you what you are looking for.

 

If you want to use a measure this are calculated based on the context of the visuals so if you add the measure below to your table it also will give you the expect result:

 

Max_Value = Max(Table[Value])

See below the results in the visuals with both options measure and Summary Max

 

Maximum.png

 

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.