I have imported dataset into quicksight and have 2 columns . DateTime and A.
I want to show a gauge chart comparing the latest value of A(using Date time) compared to last 30 days of A.
When I use lastValue then I get the error “Table calculation attribute missing”
How can I show that?
Here is the formula I am using:
lastValue(
{MEMBR_FT500[Sm3/h]},
[DateTime DESC]
)
Hi @ankit4aug ,
Welcome to the QuickSight Community!!
I think you can try breaking down the formula into subsequent steps.
Step1 : calculate latest date using maxOver(Datetime,,pre_agg)
step 2 : return measure for latest date
ifelse(datetime=maxdate, measure, null)
step 3: similarly calculate last 30 days number
ifelse(datetime=last30th day, measure, null)
Use in Gauge chart as needed. Check if this works out!
Thanks,
Prantika
1 Like