Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
LordGrim
Contributor III
Contributor III

Chart to display last 90 days only issue

 - 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

1 Solution

Accepted Solutions
Mauritz_SA
Partner - Specialist
Partner - Specialist

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.

View solution in original post

8 Replies
Claudiu_Anghelescu
Specialist
Specialist

Count({<[Date Created] = {"<=Date(Today())-90"}>}[Month Created])

 

Try to change the sign if you want to show past 90 days and put Date()

To help community find solutions, please don't forget to mark as correct.
LordGrim
Contributor III
Contributor III
Author

I really expected that to work thankyou,  but it doesnt? Strange that actual day does but today() - 90 does not?

Mauritz_SA
Partner - Specialist
Partner - Specialist

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

LordGrim
Contributor III
Contributor III
Author

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?

 
 

syntax.PNG

Claudiu_Anghelescu
Specialist
Specialist

 
To help community find solutions, please don't forget to mark as correct.
LordGrim
Contributor III
Contributor III
Author

tried both just in case but neither works

Mauritz_SA
Partner - Specialist
Partner - Specialist

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.

LordGrim
Contributor III
Contributor III
Author

Yes that worked! Thanks very much for your help 🙂