How can I display a single row with start and end date in Amazon Quicksight?

0

Hi,

I'm seeking advice on displaying data in a single row of an Amazon Quicksight table. I need to show the start and end date of a user interaction based on specific actions and results, excluding redundant information.

For example, consider this simplified data:

DateActionResultNames
2023-12-26 15:58:10PAYMENT_CHANNELTransferred to an agentJuan Pérez
2023-12-26 15:58:32PAYMENT_CHANNELConversation initiatedJuan Pérez
2023-12-26 15:58:57PAYMENT_CHANNELEmail sentJuan Pérez
2023-12-26 15:59:07PAYMENT_CHANNELInformative audioJuan Pérez

I've tried using firstValue and lastValue functions to calculate the interaction period and dateDiff to get the duration, but this resulted in duplicated rows with null values, as shown below:

DateActionResultNamesStart dateEnd dateDuration (seconds)
2023-12-26 15:58:10PAYMENT_CHANNELnullJuan Pérez2023-12-26 15:58:102023-12-26 15:59:0700:00:57
2023-12-26 15:58:32PAYMENT_CHANNELnullJuan Pérez2023-12-26 15:58:102023-12-26 15:59:0700:00:57
2023-12-26 15:58:57PAYMENT_CHANNELnullJuan Pérez2023-12-26 15:58:102023-12-26 15:59:0700:00:57
2023-12-26 15:59:07PAYMENT_CHANNELInformative audioJuan Pérez2023-12-26 15:58:102023-12-26 15:59:0700:00:57

This also happens because I have to add the attributes of conversationid and date in order to use first and last value functions. I know I can hide those columns but the problem is the duplicated rows.

The result I am expecting is to display the data as it follows:

ActionResultNamesStart dateEnd dateDuration
PAYMENT_CHANNELInformative audioJuan Pérez2023-12-26 15:58:102023-12-26 15:59:0700:00:57

How can I achieve this and eliminate the unwanted duplicated rows with null values and the different dates which cause the rows to duplicate?

I appreciate any insights or suggestions on the best approach for this scenario.

feita há 4 meses235 visualizações
1 Resposta
0

Simply eliminate NULL value. Use 'Result IS NOT NULL' or length(Result) != 0 in where clause.

sth
respondido há 4 meses
  • This might work in the ETL process, where I can manipulate the raw data, this is the last thing I have in mind but I wonder if there is any solution to apply in AWS Quicksight, which doesn't let me run SQL queries.

  • Ok. In filter, Try Null options? You could use filter and exclude NULL value if it shows in filter.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas