Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
Partner
Partner

Script

Hi,

can i use same age bucket for different dashborad...with different day limits..??if so means how??????

1 Solution

Accepted Solutions
Highlighted

Re: Script

Hi,

are you sure your data is like is this????

You can try like this

ZFIFO_Ageing:

LOAD * inline [

ZFStart,ZFEnd,ZFBucket

0,2,0-2 Days

3,5,3-5 Days

6,7,6-7 days

8,15,8-15 Days

16,30,16-30 Days

30,999999,>30 days

8,999999,>7 days

];

concatenate

//ZFIFO_Ageing1:

LOAD ZFStarts as ZFStart, ZFEnds as ZFEnd, ZFBuckets as ZFBucket inline [

ZFStarts,ZFEnds,ZFBuckets

0,2,0-2 Days

3,7,3-7 Days

8,15,8-15 Days

16,30,16-30 Days

30,999999,>30 days

8,999999,>7 days

];

IntervalMatch(ZF_Age)

Load ZFStart,

     ZFEnd

Resident ZFIFO_Ageing;

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

View solution in original post

17 Replies
Highlighted
varshavig12
Valued Contributor

Re: Script

Can you give us an example for the same ?

kalyanivintha1
Contributor II

Re: Script

Hi sindhu,

you can create a same size of buckets by using class function.

and


you posted..can i create age buckets for different dashboards....means....plz elaborate with more details.

Highlighted
Partner
Partner

Re: Script

For one dashboard, i have to create limits like 0-2 days,3-5days like tht,

For other dashboard,i have to create limits like 0-2 days,3-7 days like dt,

if i create means its shows the all limits in same dashboard,bt i need nly specific limits for specific dashboards.

Highlighted
Partner
Partner

Re: Script

i mean to say,can i use the same age bucket for different dashboards

Highlighted
ashmitasharma
New Contributor

Re: Script

Can you pls share the In-progress version of the script you have so that we can give our suggestions on that?

A sample should be a good way to 

Highlighted
kalyanivintha1
Contributor II

Re: Script

your using same data in both the dashboards?

Highlighted
Partner
Partner

Re: Script

Ofcourse kalyani, but i have to use same data only...for diff dshboard....how can i do ths.

Highlighted
krishna4bo
Contributor

Re: Script

Hi sindhu,

you can create a same size of buckets by using class function.

  Ex:

LOAD Name, DOB, Age

       Dual(Replace(Class(Age,5),'<= x <','to'), Num(Class(Aage,5))) as Bucket
FROM
[..\Desktop\Book1.xlsx]
(
ooxml, embedded labels, table is Sheet1);

  you can't create a same size of buckets by using if.

Ex:

 

LOAD Name, DOB Age,

  If(Date(DOB)>='01/01/1945' and Date(DOB)<='12/31/1960', 'Baby Boomers',
If(Date(DOB)>='01/01/1961' and Date(DOB)<='12/31/1980', 'Gen X',
If(Date(DOB)>='01/01/1981' and Date(DOB)<='12/31/1995', 'Gen Y','Gen Z'))) as Gen

    FROM
[..\Desktop\Book1.xlsx]
(
ooxml, embedded labels, table is Sheet1);

 

 

 

 

Highlighted
kalyanivintha1
Contributor II

Re: Script

what is your exact requirement sindhu...

you shared something limits on dashboards....can you please more detail,

then i will get clarity on your ..scenario.