Forum Discussion
JørgenWulff
4 years agoFrequent Visitor
Simpel DAX code does not work - even that I found the code on SQLBI and is old code for my files
Hi usergroup I have a small code of DAX, but for some reason it will not accept my YEAR argument in DATEADD. I have experienced similar issues with other DAX Expressions lately. I have a suspicion...
- Anonymous4 years ago
Hi JørgenWulff ,
As far as I know, your calcualte logic should be correct. Here I create a sample to have a test and it works well.
You can use my code and try again.
Measure = CALCULATE([Total Amount],DATEADD( 'DimDate'[Date],-1,YEAR))Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi JørgenWulff ,
As far as I know, your calcualte logic should be correct. Here I create a sample to have a test and it works well.
You can use my code and try again.
Measure =
CALCULATE([Total Amount],DATEADD( 'DimDate'[Date],-1,YEAR))
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.