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.

질문됨 4달 전236회 조회
1개 답변
0

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

sth
답변함 4달 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠