The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 that it is due to me doing training with danish settings in some Power BI templates, but in other I use English settings.
But can anybody either explain, what is wrong with the DAX or tell me why is this happens and how to solve it? (I have tried to change to ; but that did not help)
Best regards
Jørgen
Solved! Go to Solution.
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.
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.