Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
venkey2847
Contributor II
Contributor II

Limit data

Hi all,

I have year field,  it has values like 2014,2015, 2016,2017, 2019,2025

But I want display 2015,2016,2017 data only.

How can I achive this dynamically....

Please help me out this issue...

Thanks

Venkey

7 Replies
prma7799
Master III
Master III

Hi Venkey,

Use Where condition in your script.

where match(Year, 2015,2016,2017) ;

Anil_Babu_Samineni

Or this

Set Var = 2015,2016,2017;

LOAD * Inline [

Year1

2014

2015

2016

2017

2019

2025] Where Match(Year1, $(Var));

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
qlikview979
Specialist
Specialist

Hi Try like this

Dynamically it will change.

venkey2847
Contributor II
Contributor II
Author

In front end I need to display and I should have all the data for another report...

I shouldn't do filtering the data..

In table box I need to display those three years of data...

Please help me out this issue..

Thanks

Venkey

Anil_Babu_Samineni

First of all, When you create table box it will consider as 3 years data

Second thing, In set analysis you need to like below

Sum({<Year = {'2015','2016','2017'}>} 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
snehamahaveer
Creator
Creator

Hi Venky,

There are different ways of achieving this:

1. If you are using a table box - then I suggest you create an inline table in script that has years required. Use this column as dimension.

2. In a chart, use calculated dimension if you are displaying year. Eg if(Match(Year,'2015','2016','2017'), Year) and suppress null values.

3. In a chart, in the expression use set analysis to display the years required. eg. Sum({<Year = {'2015','2016','2017'}>}Sales)

Hope this helps,

S

deepakkrish
Creator
Creator

Hi Kumar

There's no option for a calculated dimension in a Table Box. Why don't you use

List box instead of Table box.