Hello, I want to ask if data goods can do date red...
# gooddata-platform
Hello, I want to ask if data goods can do date reduction. Example:
Date (Delivery Date) - Date (Release Date)
Hi, if there is a connection point between the dates, then yes you can do some arithmetic, please see:https://help.gooddata.com/doc/enterprise/en/dashboards-and-insights/maql-analytical-q[…]guage/maql-use-cases-and-tutorials/date-attribute-arithmetic
what if i want to search how many event that has duration over desired value?
@Michael Ardhyanto Hi Michael, can you share a bit more information about the case? I am not quite sure I can suggest a working solution unless I understand the case, model and object types you are working with. Right now it simply sounds like you want to count events with a WHERE condition. so something like SELECT COUNT (event_id) WHERE date_metric > 0 or am I wrong? the date metric is simply some arithmetic described in the article above.
@Zuzana Bednarova yes, the case i have field with date column and already created metric to calculate the date difference between release date and posted date. Now i wanted to count how many id where date difference were more than 3 days but when i tried on report i must brought out the id to see the calculation else it won't show
@Michael Ardhyanto I see, the metric looks ok - but only if you used a correct BY clause in your "TO Aging" metric / I can't tell because I don't know your model. But let's assume it is ok so now the question is what kind of report/insight it should be? KPI ? Table? What attributes will be in the columns or rows?
this is my TO aging metric without condition and what i expect on report should be KPI so it's only show number of how many id that had exceed 3 days
Just guessing because I don’t know your LDM but try
SELECT COUNT(To Number) WHERE (SELECT TO Aging BY To Number) > 3
in my LDM there's TO Aging table , i want to find out how many days different between posted date and release date. I have already made a metric to calculate the date difference using
SELECT *Date (Do Posted Date)* - *Date (Release Date)* BY *To Number*
. Now i want to count the TO number that had date difference more than 3 days using
select count(*To Number*) where (SELECT *TO Aging* BY *To Number*) > 3
. When i tried to put into analyze it didn't show any count
Hi this should work. I just tried to upload a single CSV and recreate the metrics and the result is what is expected I think.
here are the metrics: SELECT COUNT (Tonumber)
SELECT ( Date (Dateend) - Date (Datestart)) BY Tonumber
SELECT number WHERE *date*>3
@Zuzana Bednarova thank you for the solution it works for me but when i tried to make a single value metric by taking out the
it wont show any value
this is before and after i takeout the
to make a single value. It should be total
@Michael Ardhyanto Hi, can you please invite us to your project so we can review the measures and model? support+free@gooddata.com