Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Include YTD into a measure

Hi, 

I have the following calculation below which gives me the value for the full financial year. 

sum({<[com_dt_FY]={'FY19/20'},  prod_dt_FY ={'FY19/20'}>}total_sales) 

com_dt_FY is derived from com_dt (DD/MM/YYYY)

prod_dt_FY is derived from prod_dt (DD/MM/YYYY)

How can I amend my calculation to show only the YTD value please? Do I need to include the original date variables com_dt and prod_dt ?

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Hi,

If you have a calendar script, I will advise you create a Flag in your calendar for YtD. And if you don't have a calendar table use script below

 

IF(INYEARTODATE(YourDateFieldName,TODAY(),0),1,0) AS [%Flag_InYtD]

View solution in original post

1 Reply
Highlighted
Partner
Partner

Hi,

If you have a calendar script, I will advise you create a Flag in your calendar for YtD. And if you don't have a calendar table use script below

 

IF(INYEARTODATE(YourDateFieldName,TODAY(),0),1,0) AS [%Flag_InYtD]

View solution in original post