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: 
Not applicable

set analysis and dimensions

Hi to all,

I build a pivot table (to see file in attach) with an expression (set analysis) wich result I don't want to depend by selections on dimensions.

Result is correct but when I select just a value of "Deposito" (or "PDV") tab pivot show all values, not just the "Deposito" (or "PDV") selected.

How can I resole the problem?

Thanks in advance!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Ah, I think I understand better, try maybe this:

if(count(PDV) and count([Divisione Vendita]) and count(Deposito),

if(Dimensionality()<=3,count({$<[PDV]= , [Divisione Vendita]= ,  [Deposito]= >}  distinct TOTAL [Data rilevazione]),

   if(Dimensionality()=4,count({$<[PDV]= , [Divisione Vendita]= ,  [Deposito]= >}  distinct TOTAL <[Anno rilevazione]> [Data rilevazione])

     )

  )

)

View solution in original post

6 Replies
swuehl
MVP
MVP

Hi,

your expression looks like:

if(Dimensionality()<=3,count({$<[PDV]= , [Divisione Vendita]= ,  [Deposito]= >}  distinct TOTAL [Data rilevazione]),

   if(Dimensionality()=4,count({$<[PDV]= , [Divisione Vendita]= ,  [Deposito]= >}  distinct TOTAL <[Anno rilevazione]> [Data rilevazione])

     )

  )

You said that you don't want to have your result be dependend by selections on dimensions, but you want limit the of lines shown to the dimensions selected, right?

I think to get your results independent from the dimension values, you will need to use the TOTAL qualifier, and you already use it. The set expression will be evaluated once for the complete chart, so it will not regard dimension values. Since you clear selection on PDV, Deposito and Divisione Vendita, your chart will not be limited to your selection, if you want to have this, just remove part or all of the set expression, like:

if(Dimensionality()<=3,count(distinct TOTAL [Data rilevazione]),

   if(Dimensionality()=4,count(distinct TOTAL <[Anno rilevazione]> [Data rilevazione])

     )

  )

Not 100% sure if this is what you want, that's just how I understand your post.

Not applicable
Author

Hi swuehl,

thanks for your reply but if I use your expression:

if(Dimensionality()<=3,count(distinct TOTAL [Data rilevazione]),

   if(Dimensionality()=4,count(distinct TOTAL <[Anno rilevazione]> [Data rilevazione])

     )

  )

I get a result that depends by selections on dimension fileds and ... I don't want it!


swuehl
MVP
MVP

Ah, I think I understand better, try maybe this:

if(count(PDV) and count([Divisione Vendita]) and count(Deposito),

if(Dimensionality()<=3,count({$<[PDV]= , [Divisione Vendita]= ,  [Deposito]= >}  distinct TOTAL [Data rilevazione]),

   if(Dimensionality()=4,count({$<[PDV]= , [Divisione Vendita]= ,  [Deposito]= >}  distinct TOTAL <[Anno rilevazione]> [Data rilevazione])

     )

  )

)

swuehl
MVP
MVP

I want to suppress the dimension lines which are not compatibel with your current selection.

swuehl
MVP
MVP

Attached the modified app.

Not what you are looking for?

Not applicable
Author

Thank you very much swuehl your reply is correct!