Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to compare two year sales, at the same month and same date
ex.
count number of sold items in november this year and compare with sold items sold at the same time last year.
As we have 11. november I want to count number of sold items in november this year = 11 days and
compare with the same amount of days last year i november.
I´ve tried with some help from another thread with something like this
({<year={$(vPreviousYear)},month={$(vMaxMonth)}, day={$(vLastMaxDate)}, itemgroup={75211}>}itemnr)
but this doent work
yes you can add alternate states and make comparative analysis in your expressions in the same chart
Hi Mehmet
Using DAY gives me only the amount of items sold on TODAY() thsi year and last year.
What I want is - what is sold in november this year and the same period last year equal to the first 12 days of november this year and 12 days i november last year - hope you understand
Hi Soren,
just try this ,
Count ({<year={$(vPreviousYear)},month={$(vMaxMonth)},date={'<=$(vLastMaxDate)'}, itemgroup=75211}>}itemnr)
i tried this on your attached qvw, it works fine.
Hi MEHMET
using the expression gives me an error in the expression like this
the variable vlastMaxDate somethings is wrong and the little red wave under the end parentes???????
Hi, you only need:
count({<year, month, date={'$(vLastMaxDate)'}, itemgroup={75211}>}itemnr)
or
count({<year={$(vPreviousYear)},month={$(vMaxMonth)}, day={'$(=Day(vLastMaxDate))'}, itemgroup={75211}>}itemnr)
of course, itemgroup value is not within brackets sorry..
the right one is this;
Count ({<year={$(vPreviousYear)},month={$(vMaxMonth)},date={'<=$(vLastMaxDate)'},itemgroup={75211}>}itemnr)
Hi Ruben
the 2 expression only gives me the amount of the day and not between first day of month and lastMaxDate
which is what I want
Hi Soren,
try like this:
count({<year={$(vPreviousYear)},month={">=$(=monthstart(date(max(month))) )<=$(=monthend(date(max(month))))"}, itemgroup={75211}>}itemnr)
Regards
KC
It works but I only get the amount for VLastMaxDate and not for the whole month
from FirstDayOfMonth to VLastMaxDate
Ops, sorry I readed this too fast, then it should be:
count({<year, month, date={'<=$(vLastMaxDate)'}, itemgroup={75211}>}itemnr)
or Mehmet expression also will work