Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone!
I have an issue with the YTD expression. In my app the calendar I've created starts from the first date it finds data.
In this example, I have no data in my dataset before the 10th of January.
But if I use the YTD expression (date_field = {">=$(=Date(AddYears(Min([date_field]),-1)))<=$(=Date(AddYears(Max([date_field]),-1)))"})
my expression shows data starting from the 10th of January 2021 loosing the informations of the previous days.
I've tried to add the function YearStart() but if I select another range time it calculates data always starting from the first of Jan.
How can I solve this issue?
Thanks to all!
@danimarc12 will something like below expression help:
Date={‘>=$(=YearStart(Today()))<=$(=Today())’}>}
Let me know if it does.
Hi @sidhiq91 and thanks for your aswer.
As I said, if I use the YearStart() function, I can't compare different periods like March 2022 over March 2021.
Add a MonthStart function.
Date(MonthStart(AddYears(Min([date_field]),-1)))
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com