Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Dmichel0729
Contributor
Contributor

Year to Date Expression

Hello All, 

I am trying to create an expression that only shows the current year to date data in a Pie Chart for an element that has a status of  'On-Time'.  Below is the used expression which presents me with a 'No data to display' error. 

=Count({1<[Actual Revision Completion Status]={'On-Time'}, [Next Scheduled Effective Date] = {'$(=Year(Today()))'}>}[Actual Revision Completion Status])

I do have a Year field in my script and the Next Scheduled Effective date is in a date format. 

Any help would be appreciated!

Thank you, 

Dylan

2 Replies
rubenmarin

Hi, I think the best option here is to create a [Next Scheduled Effective Year] in script using Year([Next Scheduled Effective Date]), so you can use this field in set analysis.

Another option may be using something like: [Next Scheduled Effective Date] = {"*/$(=Year(Today()))"}, it assumes than date is in DD/MM/YYYY or MM/DD/YYYY format.

datagrrl
Creator III
Creator III

Have you tried doing the Year of the date equal to this year

Do you have a master calendar? I would just use the year from that because right now you are comparing a date to a year.

Let me know if I am reading your question wrong.