Current month and previous month average count comparison

I have an order date and order count columns, I want to plot this to a vertical bar chart. And in each bar I want to show the average of order counts of current month and previous year same month. can you suggest a solution ?

@Sheena123 ,

The periodOverPeriodLastValue should help you.

Have a look at this article as well : Creating period comparisons with QuickSight's periodOver and periodTo functions

Kind regards,
Koushik

@Koushik_Muthanna Thank you, But my requirement is like below
For e.g. I have data for 20 days for March 2024. I want to calculate monthly average.
My expectation = (sum of Data)/(Total number of days in march 2024)
= (300/31)
= 9.677
Unfortunately the periodOverPeriodLastValue function suggested provides the sum of data till 20th March 2024. I was expecting a value as mentioned in above example.

Could you please suggest a solution.

**Hi @Sheena123, besides using custom SQL – I’m out of ideas. Check out some of the functions. Also, try using the Amazon Q Assistant on the function documentation page.

Here is a set of date comparison calculations:

Did this solution work for you? I am marking this reply as, “Solution,” but let us know if this is not resolved. Thanks for posting your questions on the QuickSight Community!

In case you need further assistance with your problem, please create a sample dashboard with sample dataset showing your problem state using Arena and please create a new post, so we can look at it from a fresh perspective. (Details on using Arena can be found here - QuickSight Arena)