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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Flichaster
Frequent Visitor

New DAX User: Defining a new measure by removing date filter, leads to syntax error

NewtoDax =
VAR NEW_OverallStartDate = [NEW_OverallStartDate]
VAR StartDate =
CALCULATE(
    MIN('Everything Clarity, Project without totals'[Start Date]),
    REMOVEFILTERS('Start Date')
)
 
I really dont understand where my mistake it. I receive the following error:
Flichaster_0-1667841673788.png

Thanks

2 ACCEPTED SOLUTIONS
KNP
Super User
Super User

Add 'RETURN StartDate' on the end.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

View solution in original post

The alternative to this would be...

Replace 'VAR StartDate = ' with 'RETURN'

I prefer the VAR option for readability though.

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

View solution in original post

6 REPLIES 6
KNP
Super User
Super User

Add 'RETURN StartDate' on the end.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

KNP,

Feels like DAX is a mix of most progamming tool. Similiar to return in
R-studio/Python. Thanks much. This helped lots. 

 

The alternative to this would be...

Replace 'VAR StartDate = ' with 'RETURN'

I prefer the VAR option for readability though.

 

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

Ahh Got it. Totally agree with you on that. Thanks Again.

Greg_Deckler
Community Champion
Community Champion

@Flichaster Try:

NewtoDax =
VAR NEW_OverallStartDate = [NEW_OverallStartDate]
VAR StartDate =
CALCULATE(
    MIN('Everything Clarity, Project without totals'[Start Date]),
    REMOVEFILTERS('Everything Clarity, Project without totals'[Start Date])
)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

I still get the same error.

Flichaster_0-1667842641850.png

My start date follows a Date Hierarchy, My initial Picture with removefilters('StartDate') is a new table that does not follow Date Hierarchy

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.

Top Solution Authors
Top Kudoed Authors