Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am creating a dashboard from a Mysql table. One of the columns in the table is days which provides data ranging from 1-7 in the format 1,2,3 or 1,2,3,4 which corresponds to Sun,Mon,Tues and Sun,Mon,Tues,Wed respectively. Please let me know an efficient way to map the numbers to the days. Thanks.
Different ways are available to achieve this -
You may have mapping table -
Days_Map:
Mapping load
* inline [
DayNum, Days
1,Sun
2,Mon
3,Tue
4,Wed
5,Thu
6,Fri
7,Sat
];
Use Dual(Applymap('Days_Map',actualfieldname),Actualfieldname) as Newfieldname
Dual will help to use the same field in calculation as well, in visualization it will show the days in text.
If you have date field available and you have possibility to create days field from that then you can use date functions Day(Date) function to have the same dual field directly.