Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ajsjoshua
Specialist
Specialist

Quarter Trend

Dear all,

I have only data for the year 2017 and i am using master calendar,but i am getting 2018 quarter in bar chart.

My dimension is YearQuarter

My expression is sum({$<Year = {$(=max(Year))},MonthID={"<=$(=Max(MonthID))"},Month= >} Amount)

PFA for screenshot

Regards,

Joshua.

14 Replies
sasikanth
Master
Master

HI,

Two ways you can restrict

1) Use " LEFT KEEP " between your table and master Calendar

2) sum({$<Year = {$(=max(Year))},MonthID={"<=$(=Max(MonthID))"},Month= >} Amount)


here Max(Year) and Max(MonthID) must be from your table not from Master calendar

ajsjoshua
Specialist
Specialist
Author

Dear Sasi,

I tried with left keep but i am getting the same result.

sasikanth
Master
Master

order should be

Main table

LEFT KEEP

Master calendar

If not , please share your script screenshot

agigliotti
Partner - Champion
Partner - Champion

what's your expected result for the bar chart and what are your filter selections ?

ajsjoshua
Specialist
Specialist
Author

Hi Andrea,

i have only 2017 data and i didnt filter anything.

My dimension should be YearQuarter

2017-Q1

2017-Q2

2017-Q3

2017-Q4

sasikanth
Master
Master

What is the Link field between Master calendar and main table ? if possible please share your application it would be easy

ajsjoshua
Specialist
Specialist
Author

hi Sasi,

Date field is the link field and i am not allowed to show the script.i will create sample and update it.

agigliotti
Partner - Champion
Partner - Champion

as sasikanth_narne‌ said you should provide a sample app with mock data to help you further.

sunny_talwar

What script do you use to create YearQuarter field in the script?