Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnu123
Creator
Creator

How to use rangecount in qlikview?

Hi Team,

Can any one give me example on how to count previous month data..

For example If I am having Tickets of current months along with previous month I need to show the percentage of that  so how to write expression for that. If I am not wrong I need to use range count

Here I am having Tickets and Target tickets Here when I am select current month the data should accumulate with previous month and to show percentage for that

Here month field is dimension  and if I select Service it should take count from june to september  and to show % of that field

I.e Target tickets/Total tickets of that field.

Hope I am clear I am attaching sample data for better understanding

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Modified example to add an As Of table. Clicking on the bars keeps the same percentage now, and all related data is selected.

AsOf:

LOAD date(fieldvalue('Month',recno())) as [Month]

AUTOGENERATE fieldvaluecount('Month')

;

LEFT JOIN (AsOf)

LOAD [Month] as [As Of Month]

RESIDENT AsOf

;

INNER JOIN (AsOf)

LOAD *

RESIDENT AsOf

WHERE [As Of Month] >= [Month]

;

Dimension = As Of Month

Expression = count([Targetmet Tickets])/count([Tickets])

View solution in original post

11 Replies
Anil_Babu_Samineni

What are you expecting, Would you please share expected result from same excel and then update new one

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
harishkumarg
Creator III
Creator III

Are you expecting something like this -

A straight table with Month as dimension where each month will show the below values,

June - Count (June's Target Tickets) /  Count (June's Tickets)

July - Count (June and July's Target Tickets) / Count (June and July's Tickets)

Aug - Count (June+July+Aug's Target Tickets) / Count (June+July+Aug's Tickets)

Sep - Count (June+July+Aug+Sep's Target Tickets) / Count (June+July+Aug+Sep's Tickets)

Plus you need a filter for Group and if you select a Group value say 'Service'  then you need to see values related to Service alone?

Please confirm or correct this!

Regards

Harish

chinnu123
Creator
Creator
Author

Yes Harish. I am expecting the same need to show in bar chart.

jyothish8807
Master II
Master II

Hi Chinnu,

Hope this what yo u are looking for:

Regards

KC

Best Regards,
KC
jyothish8807
Master II
Master II

From Presentation Tab hide Exp1 and Exp2.

Regards

KC

Best Regards,
KC
harishkumarg
Creator III
Creator III

Please find the attached.

Hope this helps!

Regards

Harish

harishkumarg
Creator III
Creator III

Did this work?

Regards

Harish

chinnu123
Creator
Creator
Author

Hi Harish,

Thanks for your help it's working fine  But one question when we click on the individual bars it showing different percentages Because Why I am asking is Users will click on the individual bars and they will check the related data on back end So can you please advise on this...

johnw
Champion III
Champion III

Modified example to add an As Of table. Clicking on the bars keeps the same percentage now, and all related data is selected.

AsOf:

LOAD date(fieldvalue('Month',recno())) as [Month]

AUTOGENERATE fieldvaluecount('Month')

;

LEFT JOIN (AsOf)

LOAD [Month] as [As Of Month]

RESIDENT AsOf

;

INNER JOIN (AsOf)

LOAD *

RESIDENT AsOf

WHERE [As Of Month] >= [Month]

;

Dimension = As Of Month

Expression = count([Targetmet Tickets])/count([Tickets])