Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
tschullo
Creator III
Creator III

Qlik Sense Dual Function - Displaying Text Value

I searched on this topic and didn't find any satisfying answers. 

Something has definitely changed between QlikView and Qlik Sense.  We are running Nov 2019.

I have a set of statuses that I have formatted as DUAL values using a mapping table:

TS_StatusOrderMap:
mapping load * inline [
Status, Flag
Posted, 4
Submitted, 3
Approved, 2
Open, 1
] ;

I then apply this in the script to my table like so:

LOAD
...
DUAL(Status,ApplyMap('TS_StatusOrderMap',Status)) as Status,
...;

 

Once I reload, my Status filter only shows the numeric values 1-4, and my measure were i'm asking for it to show the
Max(Status) or even MaxString(Status) always shows a number.  I need to show the text values.

There are cases where there are multiple statuses for a given row of data, so I need to show the max status.

What is going on here?

Labels (1)
3 Replies
Saravanan_Desingh

Can you try Text(Max(Status))?

Vegar
MVP
MVP

An alternative solution could be.

TS_StatusOrderMap:
mapping load Status, dual(Status,Flag) inline [
Status, Flag
Posted, 4
Submitted, 3
Approved, 2
Open, 1
] ;

//Then apply this in the script to your table like so:

LOAD
...
ApplyMap('TS_StatusOrderMap',Status) as Status,
...;

 

tschullo
Creator III
Creator III
Author

I haven't quite put my finger on the issue yet, but it turns out that in my script, I load the data first as a temp table and then I create a new table with some additional translations.  If I do the DUAL in the first load, everything works normally, but if I do it in the second table load, the weird behavior occurs where even a filter list of the Status field shows numbers instead of text values.   Once I moved the DUAL to the first table, MaxString worked just fine.

I think this is a bug in QS as I have never seen it happen in QV.