2 Replies Latest reply on Jan 8, 2019 11:15 AM by Jim Dehner

How do you create a visual that compares todays performance with last 7 day average?

Hi All,

First time posting here, so hope i'm doing it right!

I've looked all over and can't quite find an answer to my specific situation.

I have a graph that shows number of app_events by hours in a day.

I want to have a secondary line which then displays the average performance of the last 'x' days.

I have been able to create a measure for showing the latest days data which looks like :

IF

DATETRUNC('day',[Time Edit Timestamp (copy)]) = [Latest Date] -- (latest date being {MAX([Time Edit Timestamp])} )

THEN

[Number of Records]

END

So all I need now is to create a measure that gives me an average of a given amount of days.

Any help would be much appreciated!

Thanks,

• 1. Re: How do you create a visual that compares todays performance with last 7 day average?

Hello Vernon,

Sorry this post has gone without reply and welcome to the forums.   It greatly helps the community of users to assist helping you when you come to the forums for assistance if you also share a packaged workbook with sample data.  Please read through this post - Packaged workbooks and flows: when, why, how for more information.

Patrick

• 2. Re: How do you create a visual that compares todays performance with last 7 day average?

Vernon

agree with Patrick - posting your TWBX workbook will get you a specific answer faster - but in concept recreate your formula above except check for dates less than today() and greater  than dateadd with today and -7

to cover the 7 day period then divide the total by 7

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.