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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX formula error on MAX function date time intelligence

Hi Experts

 

i am trying to write a var into the current formula using a isfilter selectedvalue statement/function, but i cannot see the error in my formula as to why i am getting "max function only accepts  a column reference as an arugment".

 

i am trying to filter the data using the date filter...on the main dashboard.

 

the Report filter measure is in the Performance Measures Table.

this data in PBIX is sample and made up.

link: https://www.dropbox.com/s/jpwiwkbx973vo0d/URL_Link_Test_File_1.pbix?dl=0

 

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

That is because switch is expecting a true outcom and MAX and MIN return the dates.
What is that you want to achive?

ISFILTERED( 'Calendar'[Date] ) & MAX('Calendar'[Date]) & MIN('Calendar'[Date]), "?filter=" & oDate, 

 Thanks 

Mariusz

View solution in original post

5 REPLIES 5
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You need to close parenthesis in MAX function, like below.

ISFILTERED( 'Calendar'[Date] ) & MAX('Calendar'[Date]) & MIN('Calendar'[Date]), "?filter=" & oDate, 

Regards,
Mariusz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 
Anonymous
Not applicable

Hi Mariusz. i just worked that out, and sorry for not spotting that. Thanks for the feedback in pointing me to the error. but when you close the Parenthesis... i get the following message now.

 

Capture.PNG

Hi @Anonymous 

 

That is because switch is expecting a true outcom and MAX and MIN return the dates.
What is that you want to achive?

ISFILTERED( 'Calendar'[Date] ) & MAX('Calendar'[Date]) & MIN('Calendar'[Date]), "?filter=" & oDate, 

 Thanks 

Mariusz

Anonymous
Not applicable

Hi

 

i mariusz, i want the ability to filter my data using the date filter similiar to how i am using the rest of the dax formula and return the result.

thanks

Anonymous
Not applicable

HI @Anonymous ,

Your sample file seems canceled, can you please share it again? In addition, '&' character means combine left and right string. For logic 'and', 'or' operation, you need to use '&&','||'.

DAX operators

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Solution Authors
Top Kudoed Authors