Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

Latest 12 months with filters selections


Can you please answer the following

1. How to show latest 12 months data in bar chart, which should allow users to see any month data in the 3 years of time based on selection

Ex:: Have a Bar chart & 3 years of data

        x-axis: MonthYear (MMM-YY)

        Y-axis: sum(sales)

Requirement: by default, chart should show latest 12months data i.e., from May-17 to Ar-18 as it is April 2018

but if an user selects any month from the filter, it should show that partcular month data

2. I have another bar chart in which users want to see all bars in the chart even though y-axis value is zero for a particular selection.

Ex:: Have a bar chart & 3 years of data

x-axis: MMM-YY   Y-axis: sum(sales)

Filter: Country

for India in country, there is data for only 2months, so the remaining bars are not coming when India gets selected, but users want to see all months on x-axis with zero as Y-value...



2 Replies
Creator III
Creator III

Re: Latest 12 months with filters selections

try this:


Sum({$<Month=, Year=, Date={">=$(=MonthStart(AddMonths(Max(Date),-12)))<$(=MonthEnd(Max(Date)))"}>} Sales)

and to show the particular month data when customer selectts the month.

you can try with conditional disply.


for the second requirement  ,de-select the option "suppress zero values" in presentation tab.

it will show the all bars when the value is Zero also.


Re: Latest 12 months with filters selections

try this:

1.=Sum({<Date={">=$(=MonthStart(Max(Date),-11))<=$(=MonthEnd(Max(Date)))"}>} Sales )