Hey Guys,
I’ve got 3 quick questions, and i don’t want to flood the forum with 3 posts so i’m merging all of them in here!
First of all, i am trying to make a calculation on ISO dates, but i can make it work how i want it.
I have a end field for example 2023-06-05T16:50:22.798Z , and a start field 2023-06-05 16:50:20.708Z . I want to have the difference in seconds, for example here 2.09s.
I am trying to combine parseDate and dateDiff but i got a bunch of error whatever i try. Can someone give me a good example of a calculated field working ? thanks
Found a solution myself : it was the ‘Z’ that was not in a supported format
Secondly, i have a table full a data, and i want to display only one item (if possible the last one, in terms of date createdAt the latest) for each different ID. Let me show you an example. I have a bunch of executions, with their differents status update. I added a calculated field that put the LAST value of the status field, so i always have the last status for this ID, in the item. But sadly it display all items so it looks like duplicate.
STATUS - ID - TIME - LASTSTATUS
-----------------------------------------------------------------------------------
SUCCESS - execId1 - 2023-06-05T16:50:32.307Z - SUCCESS
IN_PROGRESS - execId1 - 2023-06-05T16:50:31.222Z - SUCCESS
SUCCESS - execId2 - 2023-06-05T16:50:22.798Z - SUCCESS
IN_PROGRESS - execId2 - 2023-06-05T16:50:20.708Z - SUCCESS
I know that i can hide the column status that’s ok, it’s just here to display what’s happening for now. So how can i display just 1 item for each execId ?
I know that if in groupBy list there was only ID it would be fine, but then the field well would be missing data to calculate LASTSTATUS.
Is there an easy way to display only one item ?
Found solution myself : Building calculated field isLast with ifelse(maxOver(parseDate(createdAt, "yyyy-MM-dd'T'HH:mm:ss.SSS"), [actionId], PRE_AGG) = parseDate(createdAt, "yyyy-MM-dd'T'HH:mm:ss.SSS"), 1, 0) . Then filtering on the isLast param to check if it’s 1 and display
And last, it’s mostly an URL handling question. I have a general parameter, where i can pass the executionId that filter my whole dashboard to only one execution. Our authentication workflow is going through API call → generateSignedURL → send it to frontend → display dashboard.
The thing is, how do i say to quicksight that i want him to generate a signed URL with a #p.executionId param in the URL ? Is that possible ? If it’s not possible, maybe i need to change the authentication flow ? (We are using cognito + amplify in the front. Creating user with permissions and stuff in quicksight can be done if needed)
Thanks already for reading guys !! It means a lot. I hope i was clear, and it’s not too much of a flood. I’m really spending a lot a time and i feel like i’m not reaching anything.
Thanks again