Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ishanbansal1204
Contributor III
Contributor III

YTD Calculation for Weekly Dashboard

Hi Experts,

I have a situation where

Data set has been attached ***

Week and year are the filters

1st dashboard

gender is the dimension and count(age_group) is the measure

Now, when i select week and year from the filter i get details of that week.

But now as per the requirement i want the YTD values for the same

so if i am selecting week 6 and year 2016

i should get the values from week count(week1 till week6) of 2016   ( Basically the YTD)

Please suggest.

1 Solution

Accepted Solutions
sunny_talwar

Here are two expressions you can use

1) Count({<week = {"<=$(=Max(week))"}>} age_group)

2) Count({<Date = {">=$(=YearStart(Max(Date)))<=$(=Max(Date))"}, week, year>} age_group)

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

Here are two expressions you can use

1) Count({<week = {"<=$(=Max(week))"}>} age_group)

2) Count({<Date = {">=$(=YearStart(Max(Date)))<=$(=Max(Date))"}, week, year>} age_group)

Capture.PNG

ishanbansal1204
Contributor III
Contributor III
Author

Hi Sunny,

In this case this will work for Week, but we need to add year parameter as well rite?

sunny_talwar

1st expression will most likely need it, but the second expression should be fine.