I have a formula where I have to first find the max and min dates within a month against the data,
then use those values to summarize dollars figures.
I have measures that return the max and min dates. Works great.
Within a subsequent measure, use those measures as follows:
measure: cei_ending_month_current{
label: “CEI Ending Monthly Current Total”
type: sum
value_format: “#.00”
sql: CASE WHEN ${date_date} = ${max_snapshot_update}
THEN COALESCE(${agingbalancecurrent},0)
ELSE 0 END;;
I’ve used a measure within a measure, but that was a simple number type.
Aggregation is needed