Tomas Lima
03/01/2024, 1:18 AMMichael Ullock
03/01/2024, 1:48 AMTomas Lima
03/01/2024, 9:01 AMJakub Sterba
03/01/2024, 9:20 AMSELECT SUM(SELECT SUM(fact) BY Date(Date) WHERE Date(Date) = (SELECT MIN(SELECT Date (Date) by Records of FactDataset) BY ALL Date(Date)))
Records of FactDataset
is connection point/primary key defined in a dataset where you want to find the minimum date. You can find attribute Records of … in attribute section of metric editor if such connection point is not defined in LDM (GD platform creates this surrogate key attribute in this case automatically). BY ALL Date(Date) tells that there will be only one minimum date used for all displayed values of the metric and it should be filtered by the dashboard/insight filter. In case you slice the metric by e.g. Month it would calculate minimum for each month without the BY ALL Date(Date) clause.