Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
chrislofthouse
Partner Ambassador
Partner Ambassador

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))

View solution in original post

3 Replies
chrislofthouse
Partner Ambassador
Partner Ambassador

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?

Not applicable
Author

Here comes an  test app

Håkan

chrislofthouse
Partner Ambassador
Partner Ambassador

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))