Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kris_vliegen
Partner - Creator III
Partner - Creator III

Hide rows in pivot table.

Hi All,

I have a pivot table with an alternate state.The user can select 2 different periods to compare.

I'va also created a slider.

Is there a way that I can only show the rows with a percentage higher or equal to the selected % in the slider?

compare.JPG

Regards,

Kris

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

It would have to not include the outer curly braces:

vPctAbove = '<[Sales Rep]={"=Sum(Margin)/Sum(Sales)>$(vPercent)/100"}>'


Then you could do:

Sum( {State1$(vPctAbove)} Quantity )

or maybe even a more reusable way:

vPctAbove = '[Sales Rep]={"=Sum(Margin)/Sum(Sales)>$(vPercent)/100"}'


and


Sum( { State1 <$(vPctAbove)> } Quantity )

View solution in original post

5 Replies
Anil_Babu_Samineni

Could be possible from 2 different selection with 2 different objects. Can you post example

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
petter
Partner - Champion III
Partner - Champion III

Yes by using a set expression in all the expressions:

2018-01-05 10_28_10-QlikView x64 - [Data Visualization_].png

This the set expression which is similar for all expressions could be stored in a variable too so it is simpler to maintain and use in multiple expressions:

vPctAbove = '{<[Sales Rep]={"=Sum(Margin)/Sum(Sales)>$(vPercent)/100"}>}'

Then the expression for Sum(Sales) should be Sum( $(vPctAbove) Sales)

for Sum(Margin)/Sum(Sales) it wold be Sum( $(PctAbove) Margin) / Sum(Sales)

The hiding relies on the fact that all rows which contains zeros in all the expressions will be excluded.

I did the test and example in the "Data Visualization" example QlikView app that comes with QlikView to illustrate and prove my point since you didn't provide any test data.

kris_vliegen
Partner - Creator III
Partner - Creator III
Author

Thanks Petter,

It works.

But how should I use the variable vPctAbove in my expression with the alternate state?

sum( {State1}  Quantity)

petter
Partner - Champion III
Partner - Champion III

It would have to not include the outer curly braces:

vPctAbove = '<[Sales Rep]={"=Sum(Margin)/Sum(Sales)>$(vPercent)/100"}>'


Then you could do:

Sum( {State1$(vPctAbove)} Quantity )

or maybe even a more reusable way:

vPctAbove = '[Sales Rep]={"=Sum(Margin)/Sum(Sales)>$(vPercent)/100"}'


and


Sum( { State1 <$(vPctAbove)> } Quantity )

kris_vliegen
Partner - Creator III
Partner - Creator III
Author

Thanks Petter!!

It is working fine for me.