Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If function, but merge to one column in table

#Hi Fellow QLIK'ers

Below code to find Values that exist in [PO DOC TYPE] the aim is to keep this as a single Column but my below code is creating multiple new columns ... Obviously I can change my data manually then load but this defeats the object and want QLIK to do this for me removing the need to do it within Excel.

PurchaseOrderdetails:

LOAD

[PO DOC TYPE],

     If([PO DOC TYPE]='FO','FrameworkOrder',[PO DOC TYPE]),

     If([PO DOC TYPE]='ZINV','InvoicingPlan',[PO DOC TYPE]),

     If([PO DOC TYPE]='ZC2P','C2P',[PO DOC TYPE]),

     If([PO DOC TYPE]='ZWGA','WGA',[PO DOC TYPE]),

     If([PO DOC TYPE]='ZSTK','Stock/Inventory',[PO DOC TYPE]),

     If([PO DOC TYPE]='NB','OTV',[PO DOC TYPE]),

     If([PO DOC TYPE]='ECPO','CatalogueOrder',[PO DOC TYPE]),

FROM XX;

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Use Pick(Match

Pick(Match([PO DOC TYPE],'FO','ZINV','ZC2P','ZWGA','ZSTK','NB','ECPO'),

'FrameworkOrder','InvoicingPlan','C2P','WGA','Stock/Inventory','OTV','CatalogueOrder') as newFieldName

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Use Pick(Match

Pick(Match([PO DOC TYPE],'FO','ZINV','ZC2P','ZWGA','ZSTK','NB','ECPO'),

'FrameworkOrder','InvoicingPlan','C2P','WGA','Stock/Inventory','OTV','CatalogueOrder') as newFieldName

Not applicable
Author

Manish Kachhia!!! MVP !

In one, Thank you so much.   #Problemsolved

MK_QSL
MVP
MVP

Can you please close the answer by selecting Correct Answer is you got solution for your problem?

Not applicable
Author

!~There is no option to mark a correct ? - apologies i'm new to this format....?

MK_QSL
MVP
MVP

Go to my answer..

Bottom left, click on actions.

You can see Correct Answer there..