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: 
sparur
Specialist II
Specialist II

Pivot Table and Variable in Set Analysis

Hello, guys.

I have some problems with my pivot table. I hope you can help me... 🙂

If you look at my qvw example you will see, that I want to calculate EANs, which should have ROS >= Median of ROS. (see in first expression of my pivot):

count({<[ROS]={">= $(vROSMedian)"}>} [EAN]),

where vROSMedian =Round(MEDIAN({<[Manufacturer] =}>}[ROS]))

Problem is in the variable vROSMedian. this variable calculate by current selections, but not by pivot dimensions (as I want).

ROSMedian should calculate by Time and by Sales Channel and if you will see in second expression, you will see the correct value of ROSMedian.

but now if you look at the header of first expression, you will see, that vROSMedian = 751 for all lines. It's not correcterror loading image.

so count of EANs isn't correct also 😞

But If I select one Time and one Sales Channel - I will get correct numbers in first expressionerror loading image:

How I can resolve my problem? I want get correct numbers without selections in [Time] and [Sales Channel] fields.

I will be glad to hear any ideas, thanks

2 Replies
sparur
Specialist II
Specialist II
Author

No ideas? 😞

Not applicable

Variables are calculated before applying pivot dimensions. If you need pivot dimensions applied you should not use variables with expressions that depend on pivot dimensions.

Try using direct expressions instead of variables, if possible.