Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
cjett7769
Contributor II
Contributor II

Creating Chart to reflect different time frames

Hi,

I am trying to create a line chart that will allow the user to review different time frames of data. For example, if the user selects fiscal year 2016, I want the chart to populate the data for fiscal 2016 and 2015. I would also like it if the chart was able to not only do years, but months as well. For example, if the user selects Fiscal year 2016 June, I would want the chart to show data for Fiscal year 2016 June and Fiscal year 2015 June.

Labels (1)
1 Reply
Anil_Babu_Samineni
MVP
MVP

I assume, You want only for this year and Last Year

Sum({<Year, [fiscal year] = {"$(='>=' & Max([fiscal year] - 1) '<=' & Max([fiscal year])))"} >}Sales)


Following your expression for month vs month, year vs year should be:

sum({<[fiscal year] ={$(=max(Num(Year(Date(Today())))-1)), $(=max(Num(Year(Date(Today())))))}, FiscalPeriod={$(=max(Num(Month(Date(Today())))))}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful