Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kavita25
Partner - Specialist
Partner - Specialist

How to show last 6 months data on particular month in bar chart..

Hi,

I want to show last 6 months distinct count of outlet code in particular month...

For e.g

Aug    10

Sep    10

Oct     20

Nov    30

Dec    40

Jan     20

The overall count for Aug till Jan is 130...But the distinct count will be suppose 110.

So in Jan the distinct count will be 110 in Bar chart...same lyk for Dec...Nov..(according to 6 month previous data.)

My dimesnion is Month...

Kinldy help me with this issue..

I am able to get the overall count for 6 months..But I want distinct count for all 6 months.

stalwar1gwassenaarswuehl

Regards,

Kavita

1 Solution

Accepted Solutions
20 Replies
sasikanth
Master
Master

Did you try Accumulation option ?

Dimension: Month

Exp : Count(Distinct ID)

OR

try this in script

Load Month, RangeSum(COUNT,Peek('NewCount')) as NewCount;

Load

Month,

Count(distinct ID) As COUNT

FROM TABLE group by Month;

Sort the table as per requirement.

sunny_talwar

I would suggest using The As-Of Table here

kavita25
Partner - Specialist
Partner - Specialist
Author

Rangesum will sum up all the month ID. But i want all the month's distinct id...

I tried Rangesum..

sasikanth
Master
Master

Handled that please check highlighted  part once.

Load Month,Rangesum(COUNT,peek('NewCount')) as NewCount;

Load

Month, Count(Disinct ID) AS COUNT

FROM TABLE group by Month;

kavita25
Partner - Specialist
Partner - Specialist
Author

Its showing incorrect result.

I want distinct count as per last 6 months.not the accumulation.

sunny_talwar

Have you looked into my suggestion below?

kavita25
Partner - Specialist
Partner - Specialist
Author

Yes..its not working..

As you can see in the app..The count is 4315 for last 6 months i.e. Jan to Aug..

Now this count should show on the Feb  bar...

Same I want for Jan and so on...My dimension is Month..

And my bar chart should have values for Feb 4315, Jan (Dec to Jul) 3958 and so on...

sunny_talwar

I don't see AsOfCalendar in your application? Have you attached the right app?

kavita25
Partner - Specialist
Partner - Specialist
Author

Yess i chckd that its not working..so i removed it...