Skip to main content
Announcements
Document boards are being consolidated, this board no longer allows NEW documents READ MORE

Set Analysis for certain Point in Time

cancel
Showing results for 
Search instead for 
Did you mean: 
jagan
Luminary Alumni
Luminary Alumni

Set Analysis for certain Point in Time

Last Update:

Sep 20, 2022 1:59:53 PM

Updated By:

Sue_Macaluso

Created date:

Aug 29, 2015 8:41:17 AM

Hi All,

Sometimes there may be requirements from users where they want to see the charts in from certain point of time like YTD, QTD, MTD, Last 5 Years etc., please find the set analysis expressions for this type of scenarios.

YTD Sales (Year To Date)

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

Note: Year=, Quarter=, Month=, Week= excludes the selections in Year, Quarter, Month and Week dimensions.

QTD Sales (Quarter To Date)

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

MTD Sales (Month To Date)

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

WTD Sales (Week To Date)

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

Last 5 Years Sales

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

Last 6 Quarters Sales

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

Last 12 Months Sales

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

Last 15 Weeks Sales

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

Last 10 Days Sales

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

Yesterday Sales

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

You can also arrive some flags for above scenarios in script and you use those flags in Set Analysis expression if your data always based on Current Date. Refer below link created by Richard.Pearce60

Calendar with flags making set analysis so very simple

Hope this helps.

Regards,

Jagan.

Comments
Not applicable

Note: Year=, Quarter=, Month=, Week= excludes the selections in Year, Quarter, Month and Week dimensions.



What does it actual mean.....??


0 Likes
oknotsen
Master III
Master III

I suggest you test it. It does exactly what it says it does: Any selections in those fields are excluded (read "ignored").

0 Likes
Not applicable

Thanks:)

-Abdul

0 Likes
Anonymous
Not applicable

Thank you

0 Likes
beck_bakytbek
Master
Master

Thanks for sharing, very usefulon daily praxis

0 Likes
nihhalmca
Specialist II
Specialist II

Thanks for sharing, very helpful.

0 Likes
ahaahaaha
Partner - Master
Partner - Master

Thanks for the info. Good prompt.

0 Likes
neelamsaroha157
Specialist II
Specialist II

Well documented.

0 Likes
John3
Contributor III
Contributor III

Do you have any such Set Analysis for certain points in time for Qlik Sense Jagan? It woud be much appreciated. 

0 Likes
rmahfoudhi
Partner - Contributor III
Partner - Contributor III

Very helpful thank you for sharing 

0 Likes
Contributors
Version history
Last update:
‎2022-09-20 01:59 PM
Updated by: