Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Doubt about Set Analysis

Hi.

     I'm read a lot about set analysis, but i have a doubt yet...For example, in a pivot table witch i have two dimension

1º Product

2º Shop Set

And one of the is the max Cost, so..

                Store 1,2,3 | Store 4,5,6 | Store 7,8,9

Produc1        1,2                4,2                3,7

Produc2        3,6                2,9                1,5

Produc3        2,8                1,4                1,2



What i want is a set analysis who bring me always the cost of sotre 5, so the table would be:


               Store 1,2,3 | Store 4,5,6 | Store 7,8,9

Produc1        4,2                4,2                4,2

Produc2        2,9                2,9                2,9

Produc3        1,4                1,4                1,4


But when i do

max({<store={'5'}>} cost)

It return


               Store 1,2,3 | Store 4,5,6 | Store 7,8,9

Produc1          -                 4,2                -

Produc2          -                 2,9                -

Produc3          -                 1,4                -


Someone know if i can do this?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

try


max(total <Product> {<store={'5'}>} cost)

View solution in original post

4 Replies
Digvijay_Singh

Can you share actual representation of your pivot table, not sure how Store 4,5,6 is actually appearing as data. is it denoting three different stores in a field or something else?

Anonymous
Not applicable
Author

try


max(total <Product> {<store={'5'}>} cost)

Anonymous
Not applicable
Author

Yes, but i did a group os store by city...So Stores 4,5,6 they're part the same city,

in script a have:

If(substringcount('4|5|6',store)>0, 'City One')

So, the max return the maximum cost Of these stores...

Anonymous
Not applicable
Author

Thanks...It worked out