Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

YTD Calculation

Hi all ,

I have Month column as Aug-19, Sep-19......Jan-20.

Now I have taken dimension  month as Month and expression as Count(sales)

Nowi need to show as YTD calculation , how to do ? can anyone please help

Labels (1)
2 Replies
Highlighted
Master
Master

Re: YTD Calculation

depending on the case 🙂

for me there is only one YTD e.g. for your case count (Sales) from the current year i.e. 2020 until the last Sales in the current year (today)

I have met other people with a different meaning of YTD !!

so to secure your loading I suggest you to add in the loading script

load 
...
Date(Date#(MonthYear,'MMM-YY'),'MMM-YY') as Month,

..

MonthYear is a field with Aug-19, Sep-19......Jan-20.

So the YTD :

=count({<Month= {">=$(=Date(Makedate(Year(today()),1,1),'MMM-YY'))<=$(=Date(today(),'MMM-YY'))"}> } Sales)

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
Highlighted
Digital Support
Digital Support

Re: YTD Calculation

Did Taoufiq's post get you what you needed for your use case?  If so, please do not forget to return to your thread and on his post, use the Accept as Solution button to mark that as the solution to give him credit for the help and let other Members know that worked.  If you did something else, consider posting that and then mark it, and if you are still working on things, please leave an update.  We prefer to have posts properly closed out if they are solved, so please consider following up on things for us.  

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.