Change values for descriptions in Query/Dashboard
772
I have a Query object in which I am grouping by day of the week, using DOW().
This correctly returns the values:
Is there a way to display the day names instead of the numbers? I've tried the Values Style property, but from what I've seen it's for adding CSS styles.
Defining in the transaction the day of the week attribute as a formula and basing it on an enumerated domain with the names of the days of the week (the query object takes that definition and uses the names instead of the numbers).
If you don't want to define the attribute you can do the conversion from numbers to day names directly in the query, and for this there are two ways
2.a) Using the iif function, you would have something like this:
How are you?
There are two ways to achieve this:
Defining in the transaction the day of the week attribute as a formula and basing it on an enumerated domain with the names of the days of the week (the query object takes that definition and uses the names instead of the numbers).
If you don't want to define the attribute you can do the conversion from numbers to day names directly in the query, and for this there are two ways
2.a) Using the iif function, you would have something like this:
Iif(DoW(TurFec) = 1, "Monday", Iif(DoW(TurFec) = 2, "Tuesday", Iif(DoW(TurFec) = 3, "Wednesday", ...)))
2.b) using IF, and you would have something like this:
"Monday" IF DoW(TurFec) = 1; "Tuesday" IF DoW(TurFec) = 2; ...; "Saturday" IF DoW(TurFec) = 6; "Sunday" OTHERWISE
Option 1) has been around for several versions.
Option 2) is from v16u11