# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## How can I show only year to date information on a chart?

I have a data set with data dating back to 2013. However, the report I am intending to create is requires only year to date.

thanks!

1 Solution

Accepted Solutions
Employee

## Re: How can I show only year to date information on a chart?

Hi Guohao

Check out this video A Beginners' Introduction to Set Analysis (video)

Using Set Analysis - you can use an expression in a measure that will lock your chart object to a particular set of data such as:

Sum({\$<Year={'2013'}>}Sales)

Let us know if that is what you needed.

You can further expand on this with other filters being taken into consideration.

(UPDATED WITH CORRECT LINK) More videos like this are available here: New to Qlik Sense Videos

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
5 Replies
Employee

## Re: How can I show only year to date information on a chart?

Hi Guohao

Check out this video A Beginners' Introduction to Set Analysis (video)

Using Set Analysis - you can use an expression in a measure that will lock your chart object to a particular set of data such as:

Sum({\$<Year={'2013'}>}Sales)

Let us know if that is what you needed.

You can further expand on this with other filters being taken into consideration.

(UPDATED WITH CORRECT LINK) More videos like this are available here: New to Qlik Sense Videos

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
MVP

## Re: How can I show only year to date information on a chart?

In order to produce a YTD total, and especially when you need to compare it with the Prior YTD, it's advisable to create a set of flags in your Calendar table:

_CYTD_Flag for the Current YTD totals, and

_PYTD_Flag for the Prior YTD totals.

The flag is a 1/0 field, and it can be used either in Set Analysis, or simply by multiplication. There is plenty of information about using conditional flags - search this forum, or check out my new book QlikView Your Business.

cheers,

Oleg Troyansky

Valued Contributor II

## Re: How can I show only year to date information on a chart?

This comes with flags

I'm attaching the script and sample data, please check

Thanks

Satish

New Contributor III

## Re: How can I show only year to date information on a chart?

Yup. The video is indeed very helpful. The master calendar might be useful too for others who are looking at the same issue. You can add the YTD flag like what Satish suggest.

thanks all!

Employee

## Re: How can I show only year to date information on a chart?

Thanks Guohao - here is a more updated video you may find interesting:

Understanding the Master Calendar (video)

Mike

Regards,
Mike Tarallo
Qlik