Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
kumar_72
Contributor III
Contributor III

How to show top 6 months data

Hi Qlik experts,

I am new to qlik , i have one requirement where i want to show top 6 months data (which includes the months which has no data ). In the below image we can see month is showing all the numbers(1-12), my requirement is to show only latest 6 months(i.e 7-12). I have used the expression  if(Sum( {1} Month)>0, sum({<Month={">6"}>}Order),0) but it is still showing months (1-6), which i want to remove. Please help.

Qlik help.PNG

I am using below sample data.

Sales:
LOAD * INLINE [
Month Team Order
1 A 4
3 B 5
4 A 2
4 B 7
6 B 5
7 B 3
8 A 10
8 B 4
9 A 12
12 A 6
];

Calender:
LOAD * INLINE [
Month
1
2
3
4
5
6
7
8
9
10
11
12
];

2 Replies
Lisa_P
Employee
Employee

You are overthinking it. 

sum({<Month={">6"}>}Order)

kumar_72
Contributor III
Contributor III
Author

if we use the expression sum({<Month={">6"}>}Order), it will show the graph for the month 7-12,  but if we make a selection in a field let us suppose in Team field, then it will not show the months which dont have data available for the selected value (image1). My requirement is to show the bar chart for the selected value of a field + 0 values bar for any months from 7 to 12 where there is no data for selected value. 

Qlik help.PNG