Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikapple
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
Taoufiq_Zarra

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 "

(you can mark up to 3 "solutions") 😉
Brett_Bleess
Former Employee
Former Employee

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.