Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
- can anyone see the error in this script?
I have a chart that successfully displays data after set date as 01/01/2020, however I want to display it as last 90 days instead?
This works:
Count({<[Date Created] = {">=1/1/2020"}>}[Month Created])
But this does not, something in the syntax?
Count({<[Date Created] = {">=Today()-90"}>}[Month Created])
Any help appreciated 🙂
Thanks
I think it might just be a formatting issue as well then. Try the following:
Count({<[Date Created]={">=$(=Date(Today()-90,'DD/MM/YYYY'))"}>}[Month Created])
The expression evaluation at the bottom of the expression builder should show you the date in the format which works when hard coded. PS. I get 10/01/2020 for the evaluated result.
Count({<[Date Created] = {"<=Date(Today())-90"}>}[Month Created])
Try to change the sign if you want to show past 90 days and put Date()
I really expected that to work thankyou, but it doesnt? Strange that actual day does but today() - 90 does not?
Hi @LordGrim
You will have to evaluate today.
Try this if the suggestion from @Claudiu_Anghelescu doesn't work:
Count({<[Date Created]={">=$(=Today()-90)"}>}[Month Created])
Hope this helps.
Regards,
Mauritz
Thanks - again however it doesn't work and the chart is empty when I do that. 😕
I think there is something in the syntax as the colour coding does not look right?
tried both just in case but neither works
I think it might just be a formatting issue as well then. Try the following:
Count({<[Date Created]={">=$(=Date(Today()-90,'DD/MM/YYYY'))"}>}[Month Created])
The expression evaluation at the bottom of the expression builder should show you the date in the format which works when hard coded. PS. I get 10/01/2020 for the evaluated result.
Yes that worked! Thanks very much for your help 🙂