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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
EstherBR
Helper III
Helper III

MAX Sales in a period of time

Hi, 

 

I have this table and I would like to create a KPI that shows me the max sum of sales of the calendar date:

EstherBR_0-1763461765072.png

The max sales KPI gives me 135, but it should give me 369 that is the maximum sum of sales in the period selected.


How can I achieve that?


Thanks!

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @EstherBR 

I would recommend you create these measures, assuming 'Calendar'[Date] is the relevant date column:

Sales Sum =
SUM ( 'Product'[Sales] )
Max Sales by Date =
MAXX (
    VALUES ( 'Calendar'[Date] ),
    [Sales Sum]
)

Does this work for you?


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

2 REPLIES 2
OwenAuger
Super User
Super User

Hi @EstherBR 

I would recommend you create these measures, assuming 'Calendar'[Date] is the relevant date column:

Sales Sum =
SUM ( 'Product'[Sales] )
Max Sales by Date =
MAXX (
    VALUES ( 'Calendar'[Date] ),
    [Sales Sum]
)

Does this work for you?


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn
KarinSzilagyi
Super User
Super User

Hi @EstherBR 
You need to use MAXX(), which creates a virtual table and iterates over each date to get the daily sales value, then picks the maximum of those values.

Max Sales in period = 
MAXX (
    VALUES ( 'Dim_Date'[Date] ),  
    [TotalSales]                  
)

KarinSzilagyi_0-1763464011045.png

 



Did I answer your question? If so, please consider marking my response as the ‘Accepted Solution’ - it helps others with the same issue find the answer more easily!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.