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

How to generate future values from average weekdays values?

Hello colleagues!

Could you please suggest how can I get values for future dates in the diagram expression.

I need to implement the next logic: all future values must be calculated as average from 8 previous weekdays. I have already implemented this algorithm in the load script but I need to move logic to front-end. 

antonaks_0-1592901616640.png

Thank you. 

Labels (1)
  • SaaS

5 Replies
antonaks
Creator II
Creator II
Author

Up

antonaks
Creator II
Creator II
Author

Up. Really, no one knows?

brunobertels
Master
Master

Hi 

In the front End and in a straight table ou graph you will need first create the future date in your calendar 

Then as mesure it could be something like 

if (date>today(), mesure using above statement or using rangeavg() function , mesure ) 

regards

antonaks
Creator II
Creator II
Author

Yes. I have already created a table with future dates and zero values. But the problem is in expression, I can't use AVG calculation on generated values. For example, I can generate values for the first 7 days, the next day must be linked to generated value. 

brunobertels
Master
Master

Hi 

Not sure but have a look to this : the AsOfTable  

i tried in the past to make predictive value for futur date ( in fact without success due to my lake of Skills and Knowledge ) i found some approach with the asoftable and also with the linestM and LinestB function and rangeavg function.

See below my test 

Appels Recus = real received call 

My last date with real value was 16/08/2019 with 1549 received call 

second column is a test with linest_m and linest_b that gave me values for greater date than 16/08/2019 and seemed to be a good result ( at least it was giving values) 

And last column is a test with rangeavg who after several date reach to zero unfortunately 

Capture.PNG

Sorry can't help more on this but surely the community will do 

regards