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: 
Anonymous
Not applicable

Calculating average value of past 7 days

Hi everyone,

I have a table of data that shows information for pieces of equipment, this information is updated daily for each piece of equipment:

DateReading
1/15
1/23
1/35
1/41

I would like to be able to choose the date 1/4, and receive a value which refers to the following: (reading on 1/4 - Average of 1/1,1/2,1/3),

IF that value is < 3 the value on (1/4) table should be highlighted

Thank you in advance!!!

5 Replies
sunny_talwar

I would like to be able to choose the date 1/4

Would you always see this after selecting a date? and also, is date a dimension in your chart where you are looking to view this?

Anonymous
Not applicable
Author

Yes, so if I select the date 1/4.. It'll show me all the pieces of equipment and their readings which may/may not be highlighted, based on their average of readings from the week before.

Date is a dimension, yes.

sunny_talwar

If you have all possible dates in your dashboard... then you can try this

Sum(Reading) - RangeSum(Above(Sum(Reading), 1, 7))

Or you can use The As-Of Table

I suggest using As Of Table if you are able to make small changes in the script even if you have all the dates available in your dashboard

Anonymous
Not applicable
Author

I will take a look at this now.