Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to create YTD in Qliksense
=sum({<Yeear={'>=$(=Yearstart(Max(Yeear))) <=$(Max(Yeear))'}>}Ammount)
is it correct
Hi there!
No, this syntax won't fly, for a variety of reasons. If you really want to calculate it on the fly in Set Analysis, then the syntax should be like this:
sum({<Date={">=Yearstart(today())<=Today()"}>} Amount)
Or like this:
sum({<Date={"=InYearToDate(Date,Today(),0)"}>} Amount)
However, it would be even better to create a YTD flag in your calendar table and then simply select YTD_Flag={1} in Set Analysis.
If you'd like to learn more about advanced Set Analysis and advanced Qlik development techniques, join us at the Masters Summit for Qlik - coming to New Orleans on November 14-16.
Cheers,
@gnaneswarrao You can use the below set expression to get the desired output.
Sum({<OrderDate={">=$(=Yearstart(Today()))<=$(=today()))"}>}LineSalesAmount)
Please let me know if this resolved your issue, if yes please like and accept it as a solution.
Check with this
https://community.qlik.com/t5/QlikView-App-Dev/Simple-YTD/td-p/1400053
Vikas