3 Replies Latest reply: Mar 9, 2015 9:43 AM by Christopher Lofthouse

Calculation in a chart

Hello,

I would like to cound customernumbers that meet certain criterias.

I will Count all customernumbers where the customer has sum(DebPris)>30000

and where the sum is bigger this month than the previous mont. It´s the part I

have marked with bold text I cannot get running.

count({\$<\$(vSetMTD),[Segment]={"Glas"},[KundNr]={"=Sum([DebPris])>=30000"},

{Sum({\$<
\$(vSetMTD),[Segment]={"Glas"},[KundNr]={"=Sum([DebPris])>=30000"}>} [DebPris]) >

Sum({\$<
\$(vSetPreviousMonth),[Segment]={"Glas"},[KundNr]={"=Sum([DebPris])>=30000"}>} [DebPris]
)}

>} Distinct(KundNr))

kindly

Håkan

• Re: Calculation in a chart

If possible the simplest and most efficient method would be to create flags for each of these requirements in the script. Then reference them in the Set Analysis.

Can you upload a sample app?

• Re: Calculation in a chart

Here comes an  test app

Håkan

• Re: Calculation in a chart

I believe it can be achieved in the charts as follows:

if(Sum({\$<\$(vSetMTD),[Segment]={"Glas"}>} [DebPris]) > 30000 AND Sum({\$<\$(vSetMTD),[Segment]={"Glas"}>} [DebPris])>Sum({\$<\$(vSetPreviousMonth),[Segment]={"Glas"}>} [DebPris]),count({\$<\$(vSetMTD),[Segment]={"Glas"}>} Distinct KundNr))