Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Partner
Partner

Re: Chart to display last 90 days only issue

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
Highlighted
Specialist
Specialist

Re: Chart to display last 90 days only issue

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.
Highlighted
Contributor III
Contributor III

Re: Chart to display last 90 days only issue

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

Highlighted
Partner
Partner

Re: Chart to display last 90 days only issue

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

Highlighted
Contributor III
Contributor III

Re: Chart to display last 90 days only issue

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

Highlighted
Specialist
Specialist

Re: Chart to display last 90 days only issue

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

Re: Chart to display last 90 days only issue

tried both just in case but neither works

Highlighted
Partner
Partner

Re: Chart to display last 90 days only issue

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

Highlighted
Contributor III
Contributor III

Re: Chart to display last 90 days only issue

Yes that worked! Thanks very much for your help 🙂