Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
matheus_silva
Creator
Creator

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

try


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

View solution in original post

4 Replies
Digvijay_Singh
Master III
Master III

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

try


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

View solution in original post

matheus_silva
Creator
Creator
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...

matheus_silva
Creator
Creator
Author

Thanks...It worked out