Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

Mean and Stdev

i am attching sample excel file and i have and it is a straight table

dimension: assignedpcp

expression1(member count): count(Distinct memnbr)

expression2(inpatient):  sum(costinpatient)/count(Distinct memnbr)   // [costinpatient also a dimension]

No i need to write two more expressions :

mean of expression 2(inpatient)

and

stdev of expression2(inpatient).

Thank in advance

8 Replies
MVP
MVP

Re: Mean and Stdev

Overall mean and standard deviation across the chart (essentially same number repeating on each row)? Please let us know the expected results

MVP
MVP

Re: Mean and Stdev

Maybe like

=Avg( TOTAL ( sum(costinpatient)/count(Distinct memnbr)  , YourChartDims ))

=Stdev( TOTAL (sum(costinpatient)/count(Distinct memnbr)  , YourChartDims ))

Replace YourChartDims  with your chart dimension fields.

Not applicable

Re: Mean and Stdev

Mean has to remain same in all rows but stdev has to vary accordingly

MVP
MVP

Re: Mean and Stdev

Johnamos daram wrote:

Mean has to remain same in all rows but stdev has to vary accordingly

What do you mean with latter? Could you post some sample data and your expected result?

Not applicable

Re: Mean and Stdev

Could You please see the attached excel sheet so that u can see the data.

Not applicable

Re: Mean and Stdev

Maybe this will help Re: STD

MVP
MVP

Re: Mean and Stdev

Ok, but what is the expected result, specifically asking for the Stdev column 'that should vary accordingly'?

Also, is the attached data really the source, raw data table you are using? It seems you exported already your chart table with the two expressions from your OP. But then there is (at least) one dimension missing? Is this the field costinpatient? And you want to consider an overall, total Mean, but a Stdev that's calculated only across second dimension?

Please could you elaborate a bit more about your setting and requirements?

Overall, it's you that want help from us, not the other way around.

perla_chirag
New Contributor

Re: Mean and Stdev

I think Johnamos needs 'Deviation from the Mean' and not Standard Deviation

@Johnamos:

Try using

=fabs(MeanExpression - (sum(costinpatient)/count(Distinct memnbr)))

where MeanExpression should be the expression for Mean as suggested by Stefan (=Avg( TOTAL ( sum(costinpatient)/count(Distinct memnbr)  , YourChartDims )))

Community Browser