Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
abubakarsiddiq7
Contributor III
Contributor III

Need help on YTD

i have only Month field in my data source (csv)  and month values are like Jan,Feb,Mar,Apr....Dec .

for this how to implement YTD . can any one can help .

EXP: =sum({$<[Month]={'>=$(=month(YearStart(Today())))'}>}aggr(avg([Target ]),[Sold-To ]))

2 Replies
vikasmahajan

I think you need 2 expressions 

 

Sum({<Year=, Month=, Quarter=, Week=, DateField=, DateNum={">=$(=Num(YearStart(Max(DateNum))))<=$(=Max(DateNum))"}>} [Sold-To ])

 

AVG({<Year=, Month=, Quarter=, Week=, DateField=, DateNum={">=$(=Num(YearStart(Max(DateNum))))<=$(=Max(DateNum))"}>} [Target ])

 

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.