Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I`m trying to calculate last 7 days average of sales and put it in a bar chart , but when I add the expression it shows values for every day. I want to show just one bar for the average.
This is the expression:
sum({<DATE = {">=$(=Date(GetFieldSelections(DATE)-7))<=$(=Date(GetFieldSelections(DATE)))"}>} Sales) / 8
What is wrong , or what am I doning wrong?
Thank you
Apologize, I should have pointed that out. Select 'Show Total' on the dimension limits tab
What u r adding in dimension tab DATE or Month???
Date
Use Month..
Try this:
sum({<DATE = {'>=$(=Max(DATE)-7)<=$(=Date(Max(DATE))'}>} Sales) / 8
Regards!!
Well I kinda need the Date dimension , because in the same bar chart I will have total sale for today , total sales for a week ago and the average for last 7 days
sum({$<DATE = {">=$(=Date(max(DATE)-7))"}>} Sales) / 7
try this please
I wrote this expresion , but the result is not shown on my chart
Hi,
Create two vars:
vMaxDate = '=Date(Max(Date))' (without quotes)
vMaxDatePrev = '=Date(Max(Date)-7)' (without quotes)
sum({<DATE = {'>=$(vMaxDatePrev)<=$(vMaxDate)'}>} Sales) / 8
Regards!
It still shows me bars for each day. I would like to make only one bar that shows the total sum for a week