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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average Function Ignoring Null and Not providing correct value.

Hi Friends,

i am new to qlikview.

I am using Average function from qlikview.

I have some row which has no data.

but, still , it's needs to count in average calculation.

but, somehow, qlikview is ignoring that.

i have also replaced that field with 0 when it's blank,

but, still, average shows wrong value.

can someone help,

what would be work around ,

so, Average function can count blank/null rows ?

thanks!.

7 Replies
marcus_sommer

Maybe you could get your result without avg() with sum(value) / count(value).

- Marcus

Not applicable
Author

yes, that correct,

but,

we need to get this using AVG function instead of Sum and Count.

marcus_sommer

I don't think that this will work - NULL will be general ignored from expressions and 0 will be handled as FALSE and I believe that this will be also ignored by most of the expressions - but why is avg() a must?

Further see here for averages: Average – Which average?

- Marcus

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try something like this

     =Avg({<DimensionName*={'*'}>} MeasureName)

OR

    =Avg({<MeasureName*={'*'}>} MeasureName)

OR

      =Avg({<MeasureName=P(MeasureName)>} MeasureName)

HOpe this helps you.

Regards,

Jagan.


Not applicable
Author

Thanks.

i need to use this measure in denominator.

i have tried -

=Avg({10000/<MeasureName*={'*'}>} MeasureName)


but its not working.


any help would be appreciated

rbecher
MVP
MVP

This is wrong set analysis syntax. Can you please upload an example to illustrate the problem.

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
jagan
Partner - Champion III
Partner - Champion III

HI,

If you want to divide 10000 with the expression the try like below

=10000/Avg({<MeasureName*={'*'}>} MeasureName)


If you provide sample data and your expected value then it would be easier to give solution.


Qlik Community Tip: Posting Successful Discussion Threads


Regards,

Jagan.