Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR June 25, 2025: Build on Apache Iceberg with Qlik Open Lakehouse - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

inyeartodate function

Hello.

I have the below expression in a chart to compare the current with the previous month.

You have to choose the year current and previous and also

you have to choose the month

Sum(if (InYearToDate (date_id, Today(), 0), sales)) for current sales by now

Sum(if (InYearToDate (date_id, Today(), 0), sales)) for previous sales for the period that the current sales has

For example that compares the 1/12/2013-17/12/2013 with the 1/12/2012-17/12/2012

If the month is completed the expression will compare the hole month

The issue i have is that i want to compare the sales for the current and the previous year and the month for the maximum

hour. How can i do this ? I tried this

Sum(if (InYearToDate (date_id,max(hour), Today(), 0), sales))

but nonthing

0 Replies