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

Show YTD data 6 month back from current month

Dear All,

I have a chart wherein i need to show 6 month YTD values as follow :

In Jan 2015 should show data from month Jul 2014, Feb 2015 should data of month Jul-Aug 2014.

Mar 2015 should show data of month Jul-Sep 2014 & Jul 2015 should show data of month Jul-Dec 2014 + Jan 2015 and so on.

I have to do it in chart i.e on front end If anyone have idea how do it in front end using set analysis then please share.

P.S i can't use Month as dimension

4 Replies
saurabh5
Creator II
Creator II

hi Mohsin,

if you want last 6 months data then it wont be ytd it would be rolling 6 months data right? I am slightly confused the way you want to represent the data before providing you the solution, secondly is it kind of aggregated value (you are adding months as you proceed)?

ramoncova06
Specialist III
Specialist III

here is a document that has some examples on how to do this

if you are not able to use month can you use date ?

sum({<Date={"<=$(=Addmonths(Max(Date),-6))"}>}Values)

mohsinqlik
Partner - Creator
Partner - Creator
Author

If i will use this expression sum({<Date={"<=$(=Addmonths(Max(Date),-6))"}>}Values)

then for example feb 2015 data will be added till Aug 2014 till jan 2014 but i need to show count from Aug till july not till jan

ramoncova06
Specialist III
Specialist III

meant ">=" instead of "<="


sum({<Date={">=$(=Addmonths(Max(Date),-6))"}>}Values)