Showing results for 
Search instead for 
Did you mean: 

Sporadic values for dates, want to see last score until next score is submitted

7 - Data Storage
7 - Data Storage

Hi all

I have a dataset containing numeric values for audit scores, a date field, and an auditee field. 

I can create a line chart with the score over time, however the data is "gappy" because the frequency of these audits is inconsistent. 

This presents a challenge, my customer would like to be able to see an average score for a filtered subset of the data (e.g. a group of organisations) at a specific date, but if I filter to the date (e.g. a one month period), it only shows me the audits from that month.

That average doesn't include any audit scores for organisations outside the month. 

So for example, if a score of "4" was bad, and if an audit had a score of 4 in June 2022 and I filtered to July 2022, then the score is not included in the average calculation for July 2022 even though the score of 4 is still valid for that organisation as it hasn't been updated.

Currently I'm thinking we could create a date table with a daily date field, which checks if the score has been updated and if not, record the last score. However this table will likely be several million rows long, and feels like overkill.

Any ideas?  


10 - ETL
10 - ETL


Consider setting up your score calculation so that it includes the ALL() function for the date.  Your score calculation might look something like this:  AVG(score,ALL(Dates)).  This tells the calculation to ignore the date filter.  Note:  You have to account for each grain of Date, so if users can filter on years, quarters, weeks, days.  Your calculation will have to add an ALL for each.  Something like: 

AVG(score, ALL(Years in Dates), ALL(Quarters in Dates), ALL(Months in Dates), ALL(Weeks in Dates), ALL(Days in Dates))

Hope this addresses your use case, Jim

Community Toolbox

Recommended links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]