me again:upside_down_face: so i’m trying to create...
# gd-beginners
m
me again🙃 so i’m trying to create a duration metric using this guide but for some reason it doesn’t work for me. https://help.gooddata.com/classic/en/dashboards-and-insights/maql-analytical-query-language/maql-use-cases-and-tutorials/date-attribute-arithmetic when i recreate this scenario
SELECT Date (End Date) -  Date (Start Date) BY [connection point]
as a metric it doesn’t show me any error but when i try it in analytical designer, it shows “SORRY, WE CAN’T DISPLAY THIS INSIGHT” The manual says that
The _[connection point]_ represents the primary key of the data set to which the date dimensions belong.
My dataset doesn’t have a primary key defined but I’m using an attribute to which those dates belong as a
connection point
. Can this be the reason? Or you need to take a look at the data model? thanks much in advance
but also maybe the syntax example in the manual is not precise cos if I understood correctly, metric creation requires aggregation and here we do not define any
m
Hi Masha, You would need to set the primary key in your dataset for the metric to work as it indicates the dataset to which the date dimension belongs.
m
got it it worked, thanks, Moises
🙌 2