# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## 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 ?

10 Replies
Contributor III

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

Hi,

You can try this:

Hope it helps,

New Contributor III

## 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.

Contributor III

## 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.

Esteemed Contributor

## 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?

New Contributor III

## 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

Esteemed Contributor

## 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???

Esteemed Contributor

## 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

New Contributor III

## 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,

Valued Contributor III

## 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