Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to modify YTD expression to Current month ?

Hi All


This expression work fine , it display YTD sales target .

=num(Sum({$<year = {$(=Max(year)-0)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales_target/1000)/$(Columndim89))


I wanted to change the expression to current month sales target.


I want to display 850


Hope some one can advise me.


Paul Yeo

3 Replies
paulyeo11
Master
Master
Author

my QVW

karthikoffi27se
Creator III
Creator III

Hi Yeo

Try this

Floor(Date) AS DateKey


Sum({<DateKey={">=$(=Num(MonthStart(Max(DateKey)))) <=$(=Num(Max(DateKey)))"}>}Sales)


Many Thanks

Karthik

paulyeo11
Master
Master
Author

Hi Sir


I have try your recomeended expression , but it display null.


D AS Date,


=num(Sum({<Date={">=$(=Num(MonthStart(Max(Date)))) <=$(=Num(Max(Date)))"}>}sales)))


i Expect it display 216


From below expression :-

=num(Sum({$< Month_n  ={"1"}>} sales/1000)/Rate  )


But i don't want to use Month_n field , instead i want to use SET analysis.



Paul Yeo