Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

Latest 12 months with filters selections

Hi,

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...

Regards

Mohan

2 Replies
Highlighted
Creator III
Creator III

Re: Latest 12 months with filters selections

try this:

1.

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.


2.


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.

Partner
Partner

Re: Latest 12 months with filters selections

try this:

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