10 Replies Latest reply: Jan 15, 2018 9:59 AM by Jahanzeb Hashmi

Show Today's month Quantity  and Same Day Last Year's month Quantity

Hello,

Today is 15th January,2018. I want to show this month's data on the  bar chart until today  and also last year's data in this month(until 15th of January), I should show the quantity of these data,

To show the data that was on the 15th of January in 2017, I use this formula for the dimension =AddYears(Date(Today()),-1)

To show the quantity that was in January until today(2018) I use this formula for the measure, that works quite well

=Sum({\$<Year={2018}>}Quantity)

But I also want to make the same thing for the last year's data. I wrote this but this doesn't work

How can I make it ?

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

Hi,

You can try this:

Hope it helps,

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

It doesn't work

I don't need Start of month,I need to sum Quantities for current period Like for 2 weeks that has passed this year and to compare this to the Sum of the same period Last year. For Example today is 15th January  and I want to sum quantities from 1-15 January in 2017 and 2018 and compare this data in the bar chart.

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

If you can share your qvf file and the output you desire, I can look into it.

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

if today is not 15 January, but rather 15 February? What do u want to compare?

1st January 2018 to 15 Feb  2018 and 1st Jan 2017 to 15 Feb 2017

or 1st Feb to 15 Feb 2017 and 2018?

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

I want to compare 15th February 2017 to 15th February 2018 and 15 March 2017 to 15 March 2018 and etc

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

what?

how do u want to compare March 2017 to 15 March 2018 while "today's date is 15 Feb 2018" and thus we do not have any data beyond this date???

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

Maybe you'll find in it sthing that could help u :

YTD, MTD issue

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

For example,  tomorrow in the bar chart there should be 1/16/17 and 1/16/18 and the next day there should be 1/17/17 and 1/17/18 and etc

Like this,

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

may be you would like to use valuelist(today(),addyears(today(),-1)) as dimension and sum(quantity) as measure

or

expression

please check the date format if required

• Re: Show Today's month Quantity  and Same Day Last Year's month Quantity

Looks like you are looking Each Day comparison.

the result of

=Sum({\$<Year={2018}>}Quantity)

will show you the Quantity until today because of no record exist for tomorrow.

i would Say

Sum({\$<Year={\$(Year(today))},Year={\$(Month(today))},Year={\$(Day(today))}>}Quantity)

for last Year

Sum({\$<Year={\$(Year(today)-1)},Year={\$(Month(today)-1)},Year={\$(Day(today)-1)}>}Quantity)