Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Surya
Creator II
Creator II

Need help for make logic in data model

Hello.,

I have an Requirement 

for example Number = 3

in this case we need to develop

date1,date2

1 ,3

2,4

3,5

4,6

 

upto

87,90

....

Here we need to take 

 

date1,date2   sum(sales),avg(sales)

1 ,3        100                   100/3(3 is number)

2,4        250                  250/3

3,5       200                     200/3

4,6      400                   400/3

 

upto

87,90   350             350/3

 

and like we are getting all avg sales we need to take max of avg(sales)

 

number also change for every material.

 

this all process we are one value like this we are having so many materials we require each and every material max (avg(sales))

 

 

Please help me...

as much as you know.

 

Thanks in Advance

2 Replies
qliksus
Specialist II
Specialist II

Not sure whether i understood you correctly   (avg(sales)) for each material  is gonna return one value so is the Max( avg(sales)) is for the all the material?   if that the case just create striaght table and in the expression tab select Max instead of Sum in the Total Mode 

 

 

 

 

 

Surya
Creator II
Creator II
Author

No., you are not getting my point first we need to make cycles and then every cycle  we need to get sum and then we are getting avg (sum)

 

for ex

number =3 

1,3  

2,4

3,6

..

87,90

.....

now we need to sum  bet ween date 1 to date 3 like 87 to 90 cycle

..