Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
dhanavindhan
Creator
Creator

Field grouping

Dear Experts,

I want to write expression which needs to group my field value.

My issue:

I have a column name called "Invstatus" under this we have 2 options Invoiced & Not Invoiced. Users enter like dis for invoiced

Eg:Invoiced

Invoiced, Invoiced, Invoiced

Not Invoiced

While I apply condition to show only invoiced amount it takes only field value Invoiced remaing invoiced, invoiced are left out. I need to group them all into single field like dis

Invoiced

Not Invoiced

How can I achieve this by using qlik expression?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

LOAD

     Invstatus,

     If(Left(Invstatus,3) = 'Not', 'Not Invoiced','Invoiced') as NewInvstatus,

     ...

View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe like

LOAD

     Invstatus,

     If(Left(Invstatus,3) = 'Not', 'Not Invoiced','Invoiced') as NewInvstatus,

     ...

captain89
Creator
Creator

Hi,

it seems like a description field. Can the user put any value in this field?

There are several ways to group a field but you willl give us a rule to determinate when a row is invoiced.

ERP systems usually have a flag-field with this information.... Y/N. Check with your provider...

for example index function:

LOAD if(index(Upper(Invstatus), 'NOT')>0, 'Not Invoiced', 'Invoiced') as Invoiced?, * INLINE [

    Invstatus

    E.g.: Not Invoiced

    Invoiced

    E.g. Invoiced

    Inv.

    Not. Inv.

    NOT INVOICED

];

Invstatus Invoiced?
E.g. InvoicedInvoiced
E.g.: Not InvoicedNot Invoiced
Inv.Invoiced
InvoicedInvoiced
NOT INVOICEDNot Invoiced
Not. Inv.Not Invoiced