Which values does the OrderDate field contain after executing the script?

A data architect executes the following script:

Which values does the OrderDate field contain after executing the script?
A . 20210131, 2020/01/31, 31/01/2019
B . 20210131, 2020/01/31, 31/01/2019, 9999
C . 20210131, 2020/01/31, 31/01/2019, 0
D . 20210131, 2020/01/31, 31/01/2019, 31/12/2022

Answer: D

Explanation:

In the script provided, the alt() function is used to handle various date formats. The alt() function in Qlik Sense evaluates a list of expressions and returns the first valid expression. If none of the expressions are valid, it returns the last argument provided (in this case, ’31/12/2022′).

Step-by-step breakdown:

The alt() function checks the Date field for three different formats:

YYYYMMDD

YYYY/MM/DD

DD/MM/YYYY

If none of these formats match the value in the Date field, the default date ’31/12/2022′ is assigned.

Values in the Date field:

20210131: Matches the first format YYYYMMDD.

2020/01/31: Matches the second format YYYY/MM/DD.

31/01/2019: Matches the third format DD/MM/YYYY.

9999: Does not match any of the formats, so the alt() function returns the default value ’31/12/2022′.

Latest QSDA2024 Dumps Valid Version with 50 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments