Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
aveeeeeee7en
Specialist III
Specialist III

New Field Requirement

Hi All

I want to get the Required field row from Closing MOB Field Values:

Average of Closing MOB in New Field

MonthClosing MOBRequired Field by using CLOSING MOB Field values
Jan10261,026
Feb10251,026
Mar10271,026
Apr10321,028
May10401,030
Jun10341,031
Aug10151,028
Sep10161,026
Nov10051,023
Dec10021,021

Regards

Aviral

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I am not sure if you want to do this in script, or in a chart/table. If its a chart or table then use:

     =RangeAvg(Above([Closing Mob], 0, RowNo()))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

11 Replies
its_anandrjs

Can you explain by an example to understand. For Apr how comes 1028.

Not applicable

Hi,

Like this ?

 

T:

Load Month,[Closing MOB],[Required Field by using CLOSING MOB Field values]&Temp as [Required Field by using CLOSING MOB Field values];

Load * Inline [
Month, Closing MOB, Required Field by using CLOSING MOB Field values,Temp
Jan, 1026, 1,026
Feb, 1025, 1,026
Mar, 1027, 1,026
Apr, 1032, 1,028
May, 1040, 1,030
Jun, 1034, 1,031
Aug, 1015, 1,028
Sep, 1016, 1,026
Nov, 1005, 1,023
Dec, 1002, 1,021
]
;

T1:
Load [Required Field by using CLOSING MOB Field values],
Avg([Closing MOB]) as Avg
Resident T
Group By [Required Field by using CLOSING MOB Field values];

Hope it helps you..!

aveeeeeee7en
Specialist III
Specialist III
Author

Following is the Calculation:


 

Month


 

 

Closing MOB


 

 

Avg Closing MOB


 

 

Calculation


 

 

Jan


 

 

1026


 

 

1,026


 

 

1026


 

 

Feb


 

 

1025


 

 

1,026


 

 

1026+1025=2051/2     =1025.5    =1026


 

 

Mar


 

 

1027


 

 

1,026


 

 

1026+1025+1027   =3078/3  
  =1026


 

 

Apr


 

 

1032


 

 

1,028


 

 

1026+1025+1027+1032   =4110/4  
  =1027.5=1028


 

 

May


 

 

1040


 

 

1,030


 

 

1026+1025+1027+1032+1040    =5150/5  
  =1030


 

 

Jun


 

 

1034


 

 

1,031


 

 

1026+1025+1027+1032+1040+1034    =6184/6  
  =1031


 

 

Aug


 

 

1015


 

 

1,028


 

 

1026+1025+1027+1032+1040+1034+1015    =7199/7  
  =1028


 

 

Sep


 

 

1016


 

 

1,026


 

 

and so on


 

 

Nov


 

 

1005


 

 

1,023


 

 

Dec


 

 

1002


 

 

1,021


 
its_anandrjs

Use Peek and previous functions

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I am not sure if you want to do this in script, or in a chart/table. If its a chart or table then use:

     =RangeAvg(Above([Closing Mob], 0, RowNo()))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jagannalla
Partner - Specialist III
Partner - Specialist III

Hi,

Take the St.table,

Dimension -> Month

Expression -> Rangeavg (above(sum([Closing MOB]),0,RowNo()))

Hope it may helps you.

Cheers!!!

Jagan

aveeeeeee7en
Specialist III
Specialist III
Author

Hi Jonathan Thanks a Ton.

Its working on the Chart Level.

How to do this at Script Level.

aveeeeeee7en
Specialist III
Specialist III
Author

Hi Jagan Thanks.

Its Working Perfectlty.

jagannalla
Partner - Specialist III
Partner - Specialist III

Can you make your choice as correct answer/hhelpful answer