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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Range Sum

Hello,

I have the data like this.

TurnOver= Readmission/admissions

July TurnOver= Readmission/admissions

August TurnOver= July Turnover + August TurnOver / 2

Sept Turnover = July Turnover + August TurnOver +Sept Turnover / 3

This is how the calculation should be. If I'm selection only July it should take  only 1month turnover and If making selection as August then it should take Avg of July and August Turnover.

Please help. Urgent requirement. stalwar1mtojagan

Fiscal MonthGender% TurnoverReadmissionAdmissions
JulFemale1.3%18414452
JulMale1.0%20720262
AugFemale1.0%14214553
AugMale1.0%20620374
1 Solution

Accepted Solutions
rahulgurram
Contributor II
Contributor II

Hi Vinay,

Try this if you are still working on this issue

(rangesum((sum({<GENDER_DETAIL-={'Elected*'}, GENDER = {'Female'}>}ReAdmissions)/(count({<GENDER_DETAIL-={'Elected*'}, GENDER = {'Female'}>}FTE))),Above(Female)))

/(rangesum(above((count(Distinct {<GENDER_DETAIL-={'Elected*'}>}FISCAL_MONTH))))+1)

Thanks

View solution in original post

9 Replies
Anonymous
Not applicable
Author

Dimension: Month

Expression:

RangeSum( Above( sum( Readmission) /sum(admissions) ,0,rowno()))/rowno()

Anonymous
Not applicable
Author

Out put would be:

 

JulFemale1.3%
JulMale1.0%
AugFemale1.2%
AugMale1.0%
Anonymous
Not applicable
Author

akka.. What is row () here...? Rajitha here

sunny_talwar

I am getting this

Capture.PNG

Expression:

=Aggr(RangeAvg(Above(Sum(Readmission)/Sum(Admissions), 0, RowNo())), Gender, [Fiscal Month])

Anonymous
Not applicable
Author

Bro, I have one calculated Dimension for Gender =IF(GENDER='Unknown',Null(),GENDER)

My actual expression is= 

(sum({<GENDER_DETAIL-={'Elected*'}>}VOL_TO_INDICATOR)

/

(count({<GENDER_DETAIL-={'Elected*'}>}FTE)))

Please correct me If I'm wrong, Final expression which I changes to is :

=Aggr(RangeAvg(Above(sum({<GENDER_DETAIL-={'Elected*'}>}VOL_TO_INDICATOR)

/

(count({<GENDER_DETAIL-={'Elected*'}>}FTE)), 0, RowNo())),

IF(GENDER='Unknown',Null(),GENDER), [Reporting Month])

Please advise, how to write it. The above one is not working for me according to ur logic.

stalwar1

sunny_talwar

Aggr cannot take in calculated dimension, have you tried with just this?

=Aggr(RangeAvg(Above(sum({<GENDER_DETAIL-={'Elected*'}>}VOL_TO_INDICATOR)

/

(count({<GENDER_DETAIL-={'Elected*'}>}FTE)), 0, RowNo())), GENDER, [Reporting Month])

Anonymous
Not applicable
Author

The august Female turnover is showing 1.0% instead of 1.1%

sunny_talwar

It would be difficult to say anything unless I see. Also, you are just comparing upto 1 decimal? Have you looked at the difference when we have lets say 4 decimals? May be the difference is rounding.

You are getting 1.051 and the solution might be giving 1.049.

rahulgurram
Contributor II
Contributor II

Hi Vinay,

Try this if you are still working on this issue

(rangesum((sum({<GENDER_DETAIL-={'Elected*'}, GENDER = {'Female'}>}ReAdmissions)/(count({<GENDER_DETAIL-={'Elected*'}, GENDER = {'Female'}>}FTE))),Above(Female)))

/(rangesum(above((count(Distinct {<GENDER_DETAIL-={'Elected*'}>}FISCAL_MONTH))))+1)

Thanks