Hello everyone, quick Q :thread:
# gooddata-ui
b
Hello everyone, quick Q 🧵
I want to create a metric where I want to count the # of instances that have a date that is: • 1 year ago to today (by default), but adjustable otherwise • OR null How do I do this?
f
Hi Byron! I’m not sure this is the right channel to ask about this, as it pertains to our SDK - GoodData.UI. Consider posting this sort of question in
gooddata-cloud
instead, next time! Now, regarding the metric, it is definitely possible. I would suggest using the IFNULL statement for the main metric combined with a Date filter on the Dashboard. So you could have something like:
SELECT IFNULL ((SELECT COUNT #Instances BY Date),0)
The idea is that it will slice the number of instances by Dates, replacing any null values with a
0
. Then you can set a Dashboard filter to show data for the last year (which can be adjusted, if desired).