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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
hariprasadqv
Creator III
Creator III

AVG,STDEV from expression

Hi All,

I am stuck in calculating Avg and Stedev from a table of values in which the values are generated from an expression. PSB for clarity

Capture.PNG

Here I am calculating Target from the below expression

num(count({$<TABLE_NAME = {'TARGET'}, VARIANCE = {'>0'}>} CONTACT_WID)/count({$<TABLE_NAME = {'TARGET'}>} CONTACT_WID) * 100,'##.##')

*I know that we can cliculate avg and Stdev in a Stright table through TOTAL option.

But I want to caliculate AVG and STDEV for the above table of values and I have to store them in a variable.

your help will be highly appreciated

Thanks in advance.

1 Solution

Accepted Solutions
hariprasadqv
Creator III
Creator III
Author

I got the solution.

Thanks to viewers

=AVG(aggr(count({$<TABLE_NAME = {'TARGET'}, VARIANCE = {'>0'}>} CONTACT_WID)/count({$<TABLE_NAME = {'TARGET'}>} CONTACT_WID) * 100,COUNTRY))

=STDEV(aggr(count({$<TABLE_NAME = {'TARGET'}, VARIANCE = {'>0'}>} CONTACT_WID)/count({$<TABLE_NAME = {'TARGET'}>} CONTACT_WID) * 100,COUNTRY))

View solution in original post

1 Reply
hariprasadqv
Creator III
Creator III
Author

I got the solution.

Thanks to viewers

=AVG(aggr(count({$<TABLE_NAME = {'TARGET'}, VARIANCE = {'>0'}>} CONTACT_WID)/count({$<TABLE_NAME = {'TARGET'}>} CONTACT_WID) * 100,COUNTRY))

=STDEV(aggr(count({$<TABLE_NAME = {'TARGET'}, VARIANCE = {'>0'}>} CONTACT_WID)/count({$<TABLE_NAME = {'TARGET'}>} CONTACT_WID) * 100,COUNTRY))