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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
samnaw
Resolver I
Resolver I

MAX not giving right result

Hello:

 

I have a column in my table called FY. It only has 2020 and 2021. So MAX should result in 2021 and MAX -1 2020. Very Simple. 

 

But when I try to do MAX its gives me the following result:

 

Its giving me the total number of rows: 6053315966

 

 

error.PNG

 

 

I know for sure my data is correct:

 

error2.PNG

 

This is a problem because when I:

 

This works

 

CY_Sales = CALCULATE (
SUM ( VW_DASHBOARD_SALES[Sales]),
FILTER ( 'VW_DASHBOARD_SALES','VW_DASHBOARD_SALES'[FY] = 2021),
FILTER ( 'VW_DASHBOARD_SALES', 'VW_DASHBOARD_SALES'[loyalty_flag] = "CARD" ) )
 
But this doesnt
 
CY_Sales = CALCULATE (
SUM ( VW_DASHBOARD_SALES[Sales]),
FILTER ( 'VW_DASHBOARD_SALES','VW_DASHBOARD_SALES'[FY] = MAX('VW_DASHBOARD_SALES'[FY]) ,
FILTER ( 'VW_DASHBOARD_SALES', 'VW_DASHBOARD_SALES'[loyalty_flag] = "CARD" ) )

 

 
 

 

 

1 REPLY 1
amitchandak
Super User
Super User

@samnaw , it should have worked, unless you have used the wrong table or column. Difficult to tell without looking at data. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors