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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

Inline sort

Hi Experts,

Can any one please help me on this.

I have the calculated Dimension expression as

=if(Match(Deals,'No. 1 Top Deal','No. 3 Top Deal'),'No13Deals',

if(Match(Deals,'No. 5 Top Deal','No. 4 Top Deal'),'No54Deals',

if(Match(Deals,'No. 2 Top Deal'), 'No2Deals')))

Sort expression as

=if(Match(Deals,'No. 1 Top Deal','No. 3 Top Deal'), Dual('No13Deals',1),

if(Match(Deals,'No. 5 Top Deal','No. 4 Top Deal'), Dual('No54Deals',2),

if(Match(Deals,'No. 2 Top Deal'), Dual('No2Deals',3))))

Please let me know how to implement the above scenario in the backend with inline sort.

expected ouput is

Deals

No13Deals

No54Deals

No2Deals

Thanks in advance

5 Replies
PrashantSangle

Hi,

try below

match(Deals,'No. 1 Top Deal','No. 3 Top Deal','No. 5 Top Deal','No. 4 Top Deal','No. 2 Top Deal')

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
shraddha_g
Partner - Master III
Partner - Master III

you can use this calculated dimension in script as

if(Match(Deals,'No. 1 Top Deal','No. 3 Top Deal'),'No13Deals',

if(Match(Deals,'No. 5 Top Deal','No. 4 Top Deal'),'No54Deals',

if(Match(Deals,'No. 2 Top Deal'), 'No2Deals'))) as NewDeals

and in SortExpression you can use

Pick(Wildmatch(NewDeals,'No13Deals','No54Deals','No2Deals'),1,2,3)

shraddha_g
Partner - Master III
Partner - Master III

Else you can also uncheck all Sort option. It will use Load order. And by default it will give you the order in which you have created it

its_anandrjs
Champion III
Champion III

In Sort expression try this with Only

=Only( {1}

if(Match(Deals,'No. 1 Top Deal','No. 3 Top Deal'),'No13Deals',

if(Match(Deals,'No. 5 Top Deal','No. 4 Top Deal'),'No54Deals',

if(Match(Deals,'No. 2 Top Deal'), 'No2Deals')))

)

sunny_talwar

You can load an inline table right at the beginning of your script

Temp:

LOAD * Inline [

Deals, DealGrouping

No. 1 Top Deal, No13Deals

No. 3 Top Deal, No13Deals

No. 5 Top Deal, No54Deals

No. 4 Top Deal, No54Deals

No. 2 Top Deal, No2Deals

];

Now use DealGrouping as your dimension and sort by load order