Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

qdatainformatic
New Contributor II

Average of values only if more than 5 answers

Hi there,

I have a table with 10 columns. I'm trying to calculate the average of 5 highest and lowest columns, but i only want to calculate for the columns that have more than 5 answers. I've transformed this table into a crosstable that has (ID,column,value) .

I'm creating a bar chart where i limit the dimension with a fixed value of 5, then i add a if(count(ID)>5, avg(value)). What happens is that the bar chart only shows items where the count is > 5. So, for the 5 lowest values, if one of the columns has a count below 5, that item does not appear in the chart, and the chart only shows 4 items.

What i need is for the chart to "move on" to the next item, and always show 5 items.


Thanks.

8 Replies

Re: Average of values only if more than 5 answers

can you provide few lines of dummy data please?

qdatainformatic
New Contributor II

Re: Average of values only if more than 5 answers

MVP
MVP

Re: Average of values only if more than 5 answers

Downloading the csv file shows no data. May be attach the file here:

Uploading a Sample

Re: Average of values only if more than 5 answers

some error in csv file.

qdatainformatic
New Contributor II

Re: Average of values only if more than 5 answers

Here goes.

Re: Average of values only if more than 5 answers

again error..

MVP
MVP

Re: Average of values only if more than 5 answers

This is what I am getting

Capture.PNG

qdatainformatic
New Contributor II

Re: Average of values only if more than 5 answers

Sorry, not sure what's wrong...