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

View all the Fabric Data Days sessions on demand. View schedule

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
Impactful Individual
Impactful Individual

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