Hello, I have a question about MAQL.
Is the MAQL syntax able to check the past date?
Example:
I have a date of 27/06/2021 then I want to check whether the date has passed 3 days or not.
Best answer by Jakub
View originalHello, I have a question about MAQL.
Is the MAQL syntax able to check the past date?
Example:
I have a date of 27/06/2021 then I want to check whether the date has passed 3 days or not.
Best answer by Jakub
View originalHi,
I noticed you already raised this question on our Slack so I will just recycle the answer provided by my colleague Zuzana:
Â
depends how exactly the metric is going to be used and with what kind of context. But in general you can create metric like this:
SELECT IF (select count (Date (Ticket Created)) WHERE Date (Ticket Created)=THIS-3)=1 THEN 1 ELSE 0 END
Which takes Today date minus 3 days and then it is wrapped in IF condition to get also the other dates but these will be zeroes, only 3 days back is 1. This can be also changed to display YES or NO, e.g. by using metric formatting. e.g.
[=0]NO;[=1]YES;
Would that fit the use case?
Â
Basically you can review our help articles on date arithmetic, using THIS syntax and conditional formatting.
etc.
I hope this helps.
Best,
Jakub
Â
Sign in with your community account. This is different than your login to your GoodData account. Don't have a community login? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.