Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conversion of data question

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.

1 Reply
Digvijay_Singh

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.