Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

soniasweety
Contributor III

Flag for Pie chart

Hi all,

Tresesco B

I want to create a pie chart  with the bucket values like below

0-7 days

7-14 days

14-30 days

30-60 days

so I want this from  "updated date column"

I don't have master calendar . And I need result in days.

19 Replies
ankur_abhishek
New Contributor III

Re: Flag for Pie chart

Hi Sony,

Please find the test qvw.

Capture.JPG

srishsum2017
Contributor

Re: Flag for Pie chart

soniasweety
Contributor III

Re: Flag for Pie chart

I need only  specified range only.  if I use above its givng more range

ankur_abhishek
New Contributor III

Re: Flag for Pie chart

Hi Sony,

I have mentioned below the qlikview script.

LOAD ID,

     Category,

     [Open Date],

     [Close Time],

     Assgn,

     [Update Time],

     Breach,

     Interval([Update Time]-[Open Date],'d')as Interval_date

FROM

(ooxml, embedded labels, table is Sheet1);

In dimension use for specific range as per your requirement:

=if(Interval_date<7,'0-7 days', if(Interval_date >7 and Interval_date < 14,'7-14 days', if(Interval_date >14 and Interval_date < 30,'14-30 days',if(Interval_date <60 and Interval_date  >30,'30-60 days' ))))

In Expression use: count(Interval_date)

Capture.JPG

soniasweety
Contributor III

Re: Flag for Pie chart

thanks Abhi,

I will check and update you

devarasu07
Honored Contributor II

Re: Flag for Pie chart

Hi,

you can try like this,

Fact:

load *, if( (age) = 0, '0',

    if( (age) >=0 and (age) <7 , '0-7 days',

    if( (age) >=7 and (age) <14, '7-14 days',

    if( (age) >=14 and (age) <30, '14-30 days',

        if( (age) >=30 and (age) <60, '30-60 days'))))) as aging_bucket;     

LOAD ID,

     Category,

     [Open Date],

     [Close Time],

     Assgn,

     [Update Time],

     Breach,

     Interval([Update Time]-[Open Date],'dd') as age

    

FROM

(ooxml, embedded labels, table is Sheet1);

soniasweety
Contributor III

Re: Flag for Pie chart

thanks devarasu,

I will try this also

soniasweety
Contributor III

Re: Flag for Pie chart

Hi,

I want to show by status  but it is givng me wrong

st_pie.PNG

soniasweety
Contributor III

Re: Flag for Pie chart

And Age column is also giving wrong result

it is taking the year 1900

190.png