Hi, I want to show current_date on the dashboard. ...
# gooddata-platform
j
Hi, I want to show current_date on the dashboard. Is there anyway to do it?
m
Hi Jing, you can use
THIS
macro for selecting current date. Feel free to check more information in the bellow documentation: https://help.gooddata.com/doc/enterprise/en/dashboards-and-insights/maql-analytical-q[…]e-where-clause/referencing-floating-time-periods/this-macro/
j
@Michael Ullock I checked this doc but it doesn't seem fulfill the request. Eventually I'd like to present the exact date, ex: 08-14-2024 instead of calculating metrics between this period. I've tried sth like select This but it doesn't work.
m
My apologies, but I’m not entirely sure what you’re looking for in this case, but if you want to refer to today’s date in MAQL equivalent it should be something like this if you wanted to show todays date in your dashboard:
Copy code
WHERE Date (Example) = THIS
As mentioned in the Doc above, in the following example, THIS macro inherits the day granularity from the Date attribute. Here THIS means this date, or “today”:
Copy code
SELECT Payment WHERE Date = THIS
If the granularity of the date attribute changes, so does the meaning of THIS.
If the above doesn’t help, would you please be so kind and provide more details on your use-case? Are you trying to show “Todays” date on your dashboard? Or todays date in a report?
j
I want to show today's date on a dashboard.
m
Thanks for the clarification - Unfortunately, we do not have widget or an Insight that will only display todays date. But please let me look into this and see if we can come up with a workable solution or work-around for you
m
You could simply filter the date attribute so it shows the current date. You will just need to disconnect the insight from the dashboard filter:
🙌 1
Screenshot 2023-08-15 at 00.57.26.png
j
@Moises Morales I don't think it fulfills the goal. We use pixel report, so your solution doesn't work for our use case.
m
Do you mean these kind of reports:
j
IN kpi report format.
m
Unfortunately, it is not possible to add it as a KPI. There is another way to get a date to show in the dashboard as described in this community article Data update | The GoodData Community. You could repurpose this workaround to load the current date instead, but note that it works best in Platform and not Cloud dashboards as the date would be updated by a scheduled ETL process. All in all, displaying such information out of the box is not supported, but if you let us know your use case, we will highlight it to our engineers on your behalf.