Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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.

 

WorkingNot Working

Thanks in advance.

 

1 Reply

  • v-cherch-msft's avatar
    v-cherch-msft
    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,