I am trying to use max(date_field) in a calculated field. but it is not returning any
value. Can someone help me figure this out?
Hi @Saisravan_Thummanepa - Welcome to AWS QuickSight community and thanks for posting the question. Can you please share the screenshot with some sample input and expected output. This will help you in guiding the right solution.
Regards - Sanjeeb
Hi @Sanjeeb2022 , I provided screenshots please verify them
Hi @Saisravan_Thummanepa - I am not able to find any screenshot, please upload it again.
Regards - Sanjeeb
Hi @Sanjeeb2022 ,
apologies for delay, It seems there was a glitch at my side, now I provided them in the reply thread please verify them.
Hi @Saisravan_Thummanepa - Since the calculated field is a measure, please use it in value field, see the below screenshot
Regards - Sanjeeb
Okay, but when I am trying to use that date in another calculated field it is giving me following error, what is the correct way to use that function?
Hi @Biswajit_1993 - Can you please help on this.
Regards - Sanjeeb
You will need to avoid have terms that are aggregated and non-aggregated in the calculation. You could use the maxOver
and percentileOver
functions instead as follows:
ifelse(
{dataset_date} = maxOver({dataset_date}, [], PRE_AGG)
AND {Cost of GB Scanned} = percentileOver ( {Cost of GB Scanned}, 90 , [] , PRE_AGG),
{Cost of GB Scanned},
NULL
)
Thanks @darcoli ,
It is working now.
Thank you @darcoli for providing the solution.
Regards - Sanjeeb