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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating the average

Dears,

I need a help about the average calculating methodology.

I have a spreadsheet where on the

column D, named "percentage", there are some percentages values, like 80% or 30%, some blank cells, and some "---" text values.

So, I would like to create and expression to calculate the average of this column, and for this the expression should eliminate the blank cells and the "---" texts values.

How can I do it?
Can you give me an example?

Thanks

7 Replies
swuehl
MVP
MVP

Hi,

so you have something like this?

LOAD * INLINE [

ColA, ColD

A, 60%

B, 30% 

C, sdfsdf

D,

E, ----

F, 120%

];

Maybe a

=avg(ColD)

will just do.

See also attached.

Regards,

Stefan

Not applicable
Author

Nop,

Because with the avg(COLID) for example, the blank and --- values will be computated. I just want to calclulate the cells that have the % values.

Thanks for your attention!

swuehl
MVP
MVP

Well in my attached example, those values will not be taken into account (I assume for the count of records).

I think the average is correct, 210 % / 3 is 70%.

So I assume your data is different from my sample.

Could you post a sample with your data?

Regards,

Stefan

Not applicable
Author

Teste.bmp

Attached is my excample.
Thanks!

swuehl
MVP
MVP

Hm, would be easier if you could post the excel file itself.

I tried to do something similar, still a plain avg(Percentage) seems to do the job.

BTW, I am currently using QV10 SR2.

Regards,

Stefan

Not applicable
Author

Maybe this is the problem, coz I'm using Wlik version 8.5

swuehl
MVP
MVP

I don't have 8.5 available here for testing.

Maybe try

=avg(if(isnum(Percentage),Percentage))