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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply

How to Calculate The Max Value in Quarter

Hi EVERYONE 

 

I have An Indicator that is Calculated Monthly, I need a Measure that calculates it quarterly based on the Max of each Quarter. EXample 

 

my indicator calculate the values monthly , like this table, what i want , to return Max value in each Quarter for each company ,  The variable is the numerator divided by the denominator, i have date table with Month column, and quarter column and year. 

 
then I will find the Rank for each company based on the max value in each quarter. 

 

COMP NameOCTNOVDEC
SDDF1200$130008000$
SSD20000$18000%30000$
FDE90000$13000$25000$
 
 
1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hello:

This measure will give you the monthly max for each quarter. You can plug your measure in where I have [Total Sales],then set your visual to quarterly.

Qtr Month MAX = Calculate(Maxx(Values('Date'[Month]),[total sales]), Filter('Date','Date'[Month] <=Max('Date'[Month])))
Here's the visual described above. I hope this helps!
Whitewater100_0-1649511582017.png

 

 

View solution in original post

3 REPLIES 3
Whitewater100
Solution Sage
Solution Sage

Hello:

This measure will give you the monthly max for each quarter. You can plug your measure in where I have [Total Sales],then set your visual to quarterly.

Qtr Month MAX = Calculate(Maxx(Values('Date'[Month]),[total sales]), Filter('Date','Date'[Month] <=Max('Date'[Month])))
Here's the visual described above. I hope this helps!
Whitewater100_0-1649511582017.png

 

 

thanks!

can you explain what this part of dax mean?

 

Filter('Date','Date'[Month] <=Max('Date'[Month])))

Hi:

This part means (Filter('Date','Date'[Month]  or Filter(ALL('Date','Date'[Month]) or Filter(ALLSELECTED('Date','Date'[Month] ) that the engine will go through all the months in your visual. Using the ALLSELECTED version could be the best choice.

 

The second part (<=Max('Date'[Month])))  means look at all the months up to and including the last month(MAX Month)  in your visual.

 

Since youer visual is based on Quarters, it will look at the months reporting into each Quarter and provide the highest month in the Quarter.

 

Below is another pattern doing the same type of thing, using SUMMARIZE to review all the months involved.

 

 

 

HighestMonthValue =

MAXX (

    SUMMARIZE (

        TableName,

        TableName[Month],

        "Total Sales", SUM ( SalesTableName[Sales] )

    ),

    [Total Sales]

)

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.