Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
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.

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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

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

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