Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

matheus_silva
Not applicable

Agrupar Valores Repetidos

Hi, there is how do that?

If(substringcount('001|002|003|004|005|006',STORE)>0,'Group1',If(substringcount('001|002|003',STORE)>0,'Group2',If(substringcount('004|005|006',STORE)>0,'Group3')))

Just Group1 appears -off course-, because first condition...Have any way to do for 001  belong Group1 and Group2 at the same time?

Thank you!!

Attached have a sample what i want...i want that sales of store1 com belong a group1 and group2.

1 Solution

Accepted Solutions
MarcoWedel
Not applicable

Re: Agrupar Valores Repetidos

Hi,

maybe one script solution could be:

QlikCommunity_Thread_240875_Pic1.JPG

SAMPLE:

load * inline

[PRODUCT,STORE,SALES

BEER,001, 10,7

MEAT,001, 30,5

BREAD,001, 50

BEER,002, 23,10

MEAT,002, 3,5

BREAD,002, 90

BEER,003, 40,8

MEAT,003, 35,5

BREAD,003, 30

BEER,004, 5,1

MEAT,004, 12,5

BREAD,004, 20

,];

tabStoreGroups:

LOAD * Inline [

STORE, GROUPS

001, GROUP1

002, GROUP1

003, GROUP1

001, GROUP2

003, GROUP2

002, GROUP3

];

hope this helps

regards

Marco

5 Replies
MarcoWedel
Not applicable

Re: Agrupar Valores Repetidos

please post some sample data and your expected result.

thanks

regards

Marco

matheus_silva
Not applicable

Re: Agrupar Valores Repetidos

I thought about what i asked, and now i conclude that is impossible, in script, i think.

But in pivot table, editing the expression, will be possible?

MarcoWedel
Not applicable

Re: Agrupar Valores Repetidos

Hi,

maybe one script solution could be:

QlikCommunity_Thread_240875_Pic1.JPG

SAMPLE:

load * inline

[PRODUCT,STORE,SALES

BEER,001, 10,7

MEAT,001, 30,5

BREAD,001, 50

BEER,002, 23,10

MEAT,002, 3,5

BREAD,002, 90

BEER,003, 40,8

MEAT,003, 35,5

BREAD,003, 30

BEER,004, 5,1

MEAT,004, 12,5

BREAD,004, 20

,];

tabStoreGroups:

LOAD * Inline [

STORE, GROUPS

001, GROUP1

002, GROUP1

003, GROUP1

001, GROUP2

003, GROUP2

002, GROUP3

];

hope this helps

regards

Marco

matheus_silva
Not applicable

Re: Agrupar Valores Repetidos

Yes...thank you...

It was a good solution...
Thank you Marcos!

MarcoWedel
Not applicable

Re: Agrupar Valores Repetidos

you're welcome

glad it helped

regards

Marco