Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_2583
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
Gabriel
Partner - Specialist III
Partner - Specialist III

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
Gabriel
Partner - Specialist III
Partner - Specialist III

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]