Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tripatirao
Creator II
Creator II

Set Analysis

Hi All

I am having Sales data for year 2011,2012,2013.

I want to find YTD.

Can I use this expression.

YTD Sales (Year To Date)

Sum({<Year=, Quarter=, Month=, Week=, Date={‘>=$(=YearStart(Today()))<=$(=Today())’}>} Sales )

1 Solution

Accepted Solutions
Not applicable

Hi,

i think it works,or else try with this

=sum({<Year={'<=$(=max(Year))'}>}sales)

View solution in original post

6 Replies
Not applicable

Hi,

i think it works,or else try with this

=sum({<Year={'<=$(=max(Year))'}>}sales)

lironbaram
Partner - Master III
Partner - Master III

yes

you can use this kind of expression

but it only work for 2015

i

Not applicable

Hi tripati,

As Liron said it works only for 2015.

jonathandienst
Partner - Champion III
Partner - Champion III

You want YTD data, I assume you also have data for 2015.

I suggest that you test the expression yourself on your data before asking whether it will work.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MK_QSL
MVP
MVP

YTD

SUM({<

     Year =, Quarter = ,Month = , Week = ,

     Date = {">=$(=YearStart(Today()))<=$(Today())"}

     >}Sales)

YTD for selected Date

YTD

SUM({<

     Year =, Quarter = ,Month = , Week = ,

     Date = {">=$(=Date(YearStart(Max(Date))))<=$(=Date(Max(Date)))"}

     >}Sales)

If you want to select Year and get the corresponding sales...

SUM({<

     Date =, Quarter = ,Month = , Week = ,    

     Year = {"$(=Max(Year))"}

>}Sales)

sunilkumarqv
Specialist II
Specialist II

=sum({<Year={$(=Max(Year))},MonthID={'<=$(=max(MonthID))'},Month=>}sales)