Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

Need Help

Hi Community,

I need one clarification..

LOAD *, Dual(Category, Cost) as Dual;

LOAD * Inline [

Date, Category, SubCAT, Cost

1/1/2012, LapTop, SML, 50

5/5/2012, LapTop, SML, 300

1/1/2012, A/C, SML, 310

3/2/2012, A/C, Big, 240

3/2/2012, Nokia, MDM, 160

7/7/2012, Laptop, MDM, 90

9/18/2012, Samsung, SML, 25

9/30/2012, Samsung, Big, 21

];

If i am using DUAL() function,  Dual(Category, Cost)  as Dual

what will happen here??

Please can you explain anyone???

5 Replies
paulwalker
Creator III
Creator III
Author

is this only sorting purpose????

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Paul,

your field Dual will contain both the textual value = Category and the numeric value = Cost. So, when the field is used as a chart dimensions or everywhere else, where the text is expected, the textual value will be displayed, and when the field is used for sorting or math, the numeric part will (or can) be used.

Think of the field Month - it shows you Jan, Feb, Mar, ... yet it's sorted numerically. Your dual field will act similarly.

cheers,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

sunny_talwar

Not really sure why you are creating Dual field, because I am almost certain that you can use Cost field to sort the same way as it would be sorted by Dual field. So not really sure what benefit it is giving here.

ganeshreddy
Creator III
Creator III

Hi Paul,

This link may help you, given clear explanation.

QlikView Addict: QlikView Functions: dual()

Best Regards,

Ganesh Reddy

jagan
Luminary Alumni
Luminary Alumni

HI,

Dual provides multi datatype feature, generally this is used for Sorting functions.  Check this link for detailed explanation

How to use- Dual()

Regards,

Jagan.