How to get the latest value to be shown on Gauge chart?

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]
)
1 Like

Hi @ankit4aug ,

Welcome to the Quick Sight 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

2 Likes

Hi @ankit4aug
do you still need help?
BR

Hi @ankit4aug,
It’s been awhile since we last heard from you, did you have any additional questions regarding your initial post?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @ankit4aug,
Since we haven’t heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

Thank you!