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
Anonymous
Not applicable

variable for today's date

Hello,

I have a problem with dates in my DAX measure which is trying to determine the current forecast versionkey. The First variable LastDateWithSales in the pictures determines the last date when there has been sales. The date is linked on a "versionkey" which points out the right sums to be calculated (Forecast calculation not included here). 

 

The problem is that when I use DATE function to set the date with fixed values the calculation works where as when ever I try to use the LastDateWithSales variable (underlined) the calculation stops working. I guess it has somethin to do with the formating but can't figure out how to solve it.

 

WorkingWorkingNot WorkingNot Working

Thanks in advance.

 

1 REPLY 1
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

It seems the variable formula could not get the correct date value.Please check and modify it.If you need further help,please follow the How to Get Your Question Answered Quickly to post your data and expected output.It would be better if you can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

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