Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
jessica_webb
Creator III
Creator III

Dynamic data suppression

Hi,

I've posted about this before, but didn't find what I was looking for, so am reposting with additional info to hopefully get the answer I need!

I want to suppress data in Qlikview, however the tricky part is that the suppression needs to be dynamic. I.e. I don't want to get rid of the data, I just don't want it to be used in an expression if it meets certain criteria.

I thought I had found a solution in using modifiers, but that didn't work for reasons that I'll outline shortly, so I'm now hoping that a simple 'If' statement in my expression will work, but I'm not quite there...

Basically, my bar chart has one dimension with two values - Male/Female. My expression calculates exam results

e.g. 'sum([Points score])/sum(Num_exams_taken)'

In some instances (I have many, many charts calculating lots of different exam types), there will only be 3 or fewer of a gender taking the exam type. In that case I do not want their results shown (for data protection reasons).

Example table: 

Exam centreGenderCandidateNum_exams_takenPoints score
Centre AFemale11225
Centre BFemale000
Centre CFemale541980
Centre DFemale145142130800
Centre EFemale12128385
Centre FFemale161616245
Centre GFemale731545
Centre HFemale1573690
Centre AMale531695
Centre BMale1042640
Centre CMale1495325
Centre DMale1063990
Centre EMale21570
Centre FMale111170
Centre GMale631680
Centre HMale353330300

So when showing all results, I should have a bar for male and a bar for female. However, if I filter by 'Centre A' the female bar should not show, but the male bar should.

I tried using a modifier:

sum({<Candidate={'>=4'}>}[Points Score])/sum({<Candidate={'>=4'}>} Num_exams_taken)

but this discounts every row where the number of candidates is fewer than four, which is not what I want.


How can I change my expression so that it basically says:

For each dimension value, check if total number of candidates (based on current selections) is greater than 3, if it is display expression result, if it isn't, don't!


All help greatly appreciated!


Thanks

Jess

2 Replies
Gysbert_Wassenaar

Perhaps like this: if(sum(Canditate)>=4,sum([Points score]),0)/if(sum(Canditate)>=4,sum(Num_exams_taken),0)


talk is cheap, supply exceeds demand
jessica_webb
Creator III
Creator III
Author

Thanks Gysbert!

In the end I tried:

IF(sum(Candidate)>=4,sum([Points Score])/sum(Num_exams_taken))

Which seems to be working. I had tried your suggestion previously but for some reason that was still causing issues.

Thanks so much for your help - fingers crossed this solution will continue to work in all cases!