How to show Quarter as Q1-year, Q2-year, values on drop down

Hi All,

For the if-else you may need to use same return data type for all the clauses: As mentioned in the document.

ifelse returns a value of the same data type as the values in then-expression . All data returned then and else expressions must be of the same data type or be converted to the same data type.

[+] Ifelse - Amazon QuickSight


Regarding the displaying of Quarter:

Defining the Quarter like mentioned here:
Custom quarter data - #9 by Neeraj

This helps in getting value like below screenshot:

concat (‘Q’ , toString( extract ( ‘Q’, addDateTime(1, ‘MM’, truncDate(‘MM’, {Order Date})))) , ’ ', toString(extract(‘YYYY’, addDateTime(1, ‘MM’, truncDate(‘MM’, {Order Date})) )) )

However this will be treated as “String” hence Regular “Date” datatype like sorting (ASC/DESC) may not be possible.

1 Like