Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
how should i adapt my formula if i only want to show sales during the last 60 days?
Sum ({<Shop= {'Pomax Store Wijnegem'}, Year= {"2012"}>}LineSalesAmount)
i also want to include an extra line showing only the sales from today minus 1 year and then also 60 days back...
thanx!
grtz,
chris
Your expression was missing a closing '}' . This will work to show the line in your chart:
Sum({<Shop= {'Pomax Store Wijnegem'}, Year = {$(= Max(Year))}, Date = {">=$(=Date(Max(Date)-90)<=(=Date(Max(Date))))"} >} LineSalesAmount)
what do u mean by extra line?
is there any date field in ur table from where u're taking Year?
i want to make a line graph, so 1 line would last 60 days of this year, and the 2nd line the 60 same days but 1 year earlier.
there i a calendar table with date and derived year, month, week.
chris
Current Year
sum({<Year={$(=Max(Year))},Month={">$(=admonths(max(Month),-2))<=$(=admonths(max(Month),0))"}>}Amount)
Last year Line
sum({<Year={$(=Max(Year))},Month={">$(=admonths(max(Month),-2))<=$(=admonths(max(Month),0))"}>}Amount)
Hope this helps
beter to use below code
Current Year
sum({<Year={$(=Max(Year))},date={">=$(=Date(Max(date)-60)<=$(=Date(Max(date))))"}>}Amount)
Last Year Line
sum({<Year={$(=Max(Year)-1)},date={">=$(=Date(Max(date)-60)<=$(=Date(Max(date))))"}>}Amount)
this will helps to acheve correct Result
hope this helps
Hello,
thanx for your answer, but isn't the expression for last year not the same as the current year?
should i do max(year) - 1 ?
grtz,
chris
yse you need to do that
see my second post its there
there are two formulas
for max year and second max year
Hope this helps
oh, sorry indeed! i missed the -1...
i still can not get even the first formula to work, to show me the last X days of this year...
could you have a peek at what i'm doing wrong?
thankx!
Your expression was missing a closing '}' . This will work to show the line in your chart:
Sum({<Shop= {'Pomax Store Wijnegem'}, Year = {$(= Max(Year))}, Date = {">=$(=Date(Max(Date)-90)<=(=Date(Max(Date))))"} >} LineSalesAmount)
thanx, indeed i missed one! 🙂
what should the formula if i want to make it independant of selections?
thanx!