Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
abubakarsiddiq7
New Contributor

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
sergio0592
Valued Contributor II

Re: Need help on YTD

vikasmahajan
Esteemed Contributor

Re: Need help on YTD

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