Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression logic

Dear All,

I have an expression as

((Sum({<[W1]*[F-1])/sum({<[W1])),

  (Sum({<[W2]*[F-2])/sum({<[W2])),  (Sum({<[W3]*[F-3])/sum({<[W3])),  (Sum({<[W4]*[F-4])/sum({<[W4])),  (Sum({<[W5]*[F-5])/sum({<[W5])),  (Sum({<[W6]*[F-6])/sum({<[W6])),  (Sum({<[W7]*[F-7])/sum({<[W7])),  (Sum({<[W8]*[F-8])/sum({<[W8]))

  )/8

and i want to create a list box where there are field as 8Week,2week,4week,6week as

8W4W6W

So on clicking i got forcasting of 8 week as per the default expression and when i click on 4week then i got Forecasting of

=

((Sum({<[W1]*[F-1])/sum({<[W1])),  (Sum({<[W2]*[F-2])/sum({<[W2])),  (Sum({<[W3]*[F-3])/sum({<[W3])),  (Sum({<[W4]*[F-4])/sum({<[W4]))

  )/4

and when i click on 6 week then

=

((Sum({<[W1]*[F-1])/sum({<[W1])),  (Sum({<[W2]*[F-2])/sum({<[W2])),  (Sum({<[W3]*[F-3])/sum({<[W3])),

  (Sum({<[W4]*[F-4])/sum({<[W4])),  (Sum({<[W5]*[F-5])/sum({<[W5])),  (Sum({<[W6]*[F-6])/sum({<[W6]))

  )/6

Please tell me the set expression for this..

1 Reply
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Maybe there is an easier way to do this, by using a slider and a variable. But then your question is already so specific... Can you give us an idea of how the forecasting data is created/available in your data model?

Peter