11 Replies Latest reply: Apr 3, 2013 4:04 AM by Hein Schultz

# 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

• ###### Re: Count number of same lines in chart

count(total <Plan> Plan)

• ###### Re: Count number of same lines in chart

Hi,

Try this expression.

count(total <Region,Plan>Plan)

Regards,

Kaushik Solanki

• ###### 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?

• ###### Re: Count number of same lines in chart

Hi,

HTh

Sushil

• ###### 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.

• ###### Re: Count number of same lines in chart

Hi,

Try this.

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

Regards,

Kaushik Solanki

• ###### 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

• ###### Re: Count number of same lines in chart

Hi,

Have a look at the attachment.

Regards,

Kaushik Solanki

• ###### Re: Count number of same lines in chart

That is perfect, thank you