Sidd Penakalapati
05/21/2024, 9:44 PMselect LAST_VALUE(({fact/reporting_building.size}))
ORDER BY {label/report_date.day} ASC
WITHIN({label/report_date.quarter})
Any help/insight/pointers would be appreciated, thanks!Julius Kos
05/22/2024, 12:10 PMIf you use facts, make sure that the fact has only a single value defined for each ORDER BY attribute.
Could you please confirm if you comply with this requirement and every report_date.day has only one fact (size) value assigned?Sidd Penakalapati
05/22/2024, 12:53 PMsize
values for a single report_date
values because there are multiple Building ID
for each report_date
. is there are an alternative approach?Jakub Sterba
05/22/2024, 1:14 PMbuilding ID
.Jakub Sterba
05/22/2024, 1:17 PMselect LAST_VALUE(SUM({fact/size}))
ORDER BY {label/report_date.day} ASC
and here is the result if I break this metric down by attributes Quarter/Year and Building ID:Jakub Sterba
05/22/2024, 1:18 PMJakub Sterba
05/22/2024, 1:20 PMJakub Sterba
05/22/2024, 1:26 PMWITHIN({label/report_date.quarter})
if you want to have breakdown by Month and display last value of the whole quarter in each monthJakub Sterba
05/22/2024, 1:32 PMselect LAST_VALUE({fact/size})
ORDER BY {label/report_date.day} ASC, {label/building_id} ASC
Michal Hauzírek
05/22/2024, 1:35 PMSELECT SUM(
LAST_VALUE ({fact/size}) ORDER BY {label/report_date.day}
WITHIN ({label/building_id})
)
Michal Hauzírek
05/22/2024, 1:36 PMLAST_VALUE
function work at all, it first required me to set a primary key on the dataset. I set report_date + buildingID)Jakub Sterba
05/22/2024, 1:42 PMSidd Penakalapati
05/22/2024, 1:45 PMSidd Penakalapati
05/22/2024, 7:11 PM