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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
raghavsurya
Partner - Specialist
Partner - Specialist

Year to date expression

Hi All,

I have a requirement wherein I have monthly sales data. I need to represent YTD sales in a straight table chart. There is a list box provided for "Month". If the user clicks on May for example..... the table should show the sales from Jan to May. can anyone help me out with completing the YeartoDate expression.

All I need is to pick the total of field called "Samount" . I tried doing the expression but its not returning any values

"Yeartodate(17-08-2010,0,1,today(),sum(Samount))"

Can you please help me out.

Regards,

Raghav

5 Replies
Not applicable

Hi,

In dimension, Date / Month field, you can define expression as

IF(Monthname(Date) < = getcurrentselections(), Dimension field, Null())

Suppress Null Values.

Happy Thoughts

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi Ravi,

thanks for your input...... Please find below the expression I could write using your inputs. But its not returning any value....

Yeartodate(IF((Monthname(Date)<= getcurrentselections()),Customer,Null()),sum(Samount))

Can you please have a look.

Regards,

Raghav

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Hi,

Please find attached the qvw file. Can you please help me to complete the YeartoDate expression.

Regards,

Raghav

Not applicable

is that what u want ... look at it ...

BR

Önder

raghavsurya
Partner - Specialist
Partner - Specialist
Author

Thanks Onder....... This is what I exactly wanted.

Regards,

Raghav