Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Mav70
Contributor II
Contributor II

Pivot Tables and Set Analysis

Hi.

Am hoping someone can help. I have some data that is split by Client, then Stage then some measures. I'm trying to set a particular measure in a pivot table for 'Stage 2'to 'N/A' where there is no data for that client in 'Stage 1'.

I've attached an example with sample data (as I can't provide the real data).

Mav70_0-1600698307187.png

 

In the pivot table shown above (and in the qvw attached from Qlik View ) I want to set 'Sum of Orders' to 'N/A' for 'Stage 2' where there is no data for 'Stage 1'. In this case, that would be for 'Client 3'.

Any assistance would be much appreciated.

Thanks in advamce,

Steve

1 Solution

Accepted Solutions
s_kabir_rab
Partner Ambassador
Partner Ambassador

Hi Steve,

best to resolve these in data model to avoid complex set analysis which can sometimes have a negative impact on a large application. I have just derived two new additional fields which I used in the pivot table to show how this can be achieved. This may not be the best approach but will give you an idea, and you can optimise it from that. But this will give you the desired outcome (see the screen shot). Hope this helps.

steve-pivot solution.jpg

Kabir
Please do not forget to the mark the post if you find it useful or provides you the solutions 🙂

View solution in original post

3 Replies
Mav70
Contributor II
Contributor II
Author

I've found one solution to this by ordering the data by Client and Stage on load and setting the value to 'N/A' in the load script. Unfortunatley, this then stops the Total line being calculated so doesn't fulfill the requirements.

s_kabir_rab
Partner Ambassador
Partner Ambassador

Hi Steve,

best to resolve these in data model to avoid complex set analysis which can sometimes have a negative impact on a large application. I have just derived two new additional fields which I used in the pivot table to show how this can be achieved. This may not be the best approach but will give you an idea, and you can optimise it from that. But this will give you the desired outcome (see the screen shot). Hope this helps.

steve-pivot solution.jpg

Kabir
Please do not forget to the mark the post if you find it useful or provides you the solutions 🙂
Mav70
Contributor II
Contributor II
Author

Perfect. Thanks Kabir!