Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rds694
Contributor
Contributor

Dimension Limitation based on Calculation

Hi all,

I'm writing a report in which I calculate the average of a survey question where users could enter values from 0-10. To do this, I'll calculating the Sum of all their responses and dividing by the count for a given grouping

num
(
Sum(Group2Response)
/
count(distinct [ID])

,'##.00'
)

 

rds694_0-1655476132657.png

I need to do a limitation on the dimension, but not on the value itself. I need the limitation to be on the specific number of survey responses going into that average, removing those bars with <10 respondents. So if there are only 5 people that listed "Other" for Gender, I need to remove their bar from the graph, in order to protect the anonymity of the survey. There are numerous filters, so by filtering and getting a small sample size, it could be possible to figure out who gave certain responses.

However, I can't figure out how to do a dimension limitation that specifically only does the sum for the individual bar. For example, this is what I'm using for the expression of the limitation.

 

num
(
Sum(Group2Response)
/
vSampleMinimum

,'##.00'

But the Sum(Group2Response) is doing the sum for all the survey results, not for the specific dimension values (i.e. it's not calculation just the sum for "Male" respondents, "Female" respondents, etc.).

How do I make it so that this sum will only calculate for the individual bar? I've tried adding in various expressions with <> and {} that I've seen online to do some "set analysis," but I'm new to qliksense and don't quite understand it. And I'm not sure it's even possible to do with the dimension limitation section.

Labels (3)
2 Replies
rubenmarin1

Hi, can you try adding the contion to the expression, like:

If(count(distinct [ID])>10, num(Sum(Group2Response)/count(distinct [ID]),'##.00'))

Or maybe with a aulated dimension like:

Aggr(If(count(distinct [ID])>10,DimensionFieldName),DimensionFieldName)

vasilev
Creator
Creator

There is a feature suggestion in the ideation platform to choose which measure to use as calculation basis using dimension limitation. You can vote for this issue to push it in the roadmap.

https://ideation.qlik.com/app/#/case/274396?currentProductId=9da99bc1-0dfb-4471-8e12-d23685578c43&se...

BR,

Rumen