
Re: Count Distinct based on positive sum  Expression
Antonio Mancini May 12, 2017 3:33 AM (in response to Kristian König)Hi Kristian,
try
Count(DISTINCT Aggr(If(Sum(Neto) > 0,Sifra),Buyer,Sifra))
Regards,
Antonio

Re: Count Distinct based on positive sum  Expression
Kristian König May 12, 2017 3:41 AM (in response to Antonio Mancini)Unfortunately not. "Buyer" is a Dimension defined in Chart properties, so the result in your formula shows me 0

Re: Count Distinct based on positive sum  Expression
Kristian König May 12, 2017 4:36 AM (in response to Antonio Mancini)My Bad... i didn't give enough information about the table. Your Formula is working with the information given...
Unfortunately i forgot to mention that my table has a lot more fields like month, year...
So when i make a Chart with 
Dimensions: Buyer, FaktureMonth
Expressions: Count(DISTINCT Aggr(If(Sum(NETO) > 0,[Šifra artikla]),Komercijalist,[Šifra artikla]))
As long i select(Filter) only one month to display, your Formula works and gives me the correct amount. But if i select more months the number changes and is now wrong. Can you adjust the formula to work with filtered dimensions?
wrong amounts(4 months selected):
Correct amounts (month by month)
I appreciate your help, thank you

Re: Count Distinct based on positive sum  Expression
Antonio Mancini May 12, 2017 4:42 AM (in response to Kristian König)Try to add FaktureMonth to Aggr()
Count(DISTINCT Aggr(If(Sum(NETO) > 0,[Šifra artikla]),Komercijalist,FaktureMonth,[Šifra artikla]))

Re: Count Distinct based on positive sum  Expression
Kristian König May 12, 2017 5:05 AM (in response to Antonio Mancini)Thank you. That helped.




Re: Count Distinct based on positive sum  Expression
Kristian König May 12, 2017 3:48 AM (in response to Kristian König)NVM found the solution, i looked at the wrong stuff... here is the "working" formula:
"count({<[Šifra artikla] = {"=sum(NETO) > 0"}>} DISTINCT [Šifra artikla])"
Thank you

Re: Count Distinct based on positive sum  Expression
Kristian König May 12, 2017 4:11 AM (in response to Kristian König)Nope... i was wrong my formula ain't right