Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

hschultz
Contributor

Count number of same lines in chart

Hi guys.

I hope someone can help me please. I actually think this should be quite easy, but i cannot find anything on it.

I have a chart (that will eventually become a pivot table) that has the calculations i require. However, i need to devide my value with the total instances of the same on the chart.

So in this example, i need Plan z1 to show 2, and the rest 1. I can then use this number to devide as needed.

If anyone can please guide me in the right direction. Thanx

1 Solution

Accepted Solutions

Re: Count number of same lines in chart

Hi,

     Have a look at the attachment.

Regards,

Kaushik Solanki

11 Replies
jsn
Honored Contributor

Re: Count number of same lines in chart

This should help you:

count(total <Plan> Plan)

Re: Count number of same lines in chart

Hi,

     Try this expression.

     count(total <Region,Plan>Plan)

Regards,

Kaushik Solanki

hschultz
Contributor

Re: Count number of same lines in chart

Hi guys

Thanx for the feedback. Both work on the Chart, but loses the sum if on a pivot table and not fully expanded.

Any tips on that plz?

sushil353
Honored Contributor II

Re: Count number of same lines in chart

Hi,

please find attached.

HTh

Sushil

Re: Count number of same lines in chart

Hi,

     Try this.

     sum(aggr(count(total <Region,Plan>Plan),Region,Customer,Plan))

Regards,

Kaushik Solanki

hschultz
Contributor

Re: Count number of same lines in chart

Thanx for the feedback, but that is not what i am looking for.

What if there were 3 or more instances? and also it should change according to selections.

hschultz
Contributor

Re: Count number of same lines in chart

That is VERY close to what i am looking for!!

The last issue now is that when i do put it in my Pivot table, it doesn't add the values correctly on my partial sums.

Re: Count number of same lines in chart

Hi,

     Give an example from your sample data, which sum is not matching? what it is showing and what it should be?

Regards,

Kaushik Solanki

hschultz
Contributor

Re: Count number of same lines in chart

Please see attached

Community Browser