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

sum if count distinct

Hello,

I have problem with counting:

firstly i tried

sum(if(count(distinct(id_branz))<=5,RoznicaWartNettoZakupu,0))

Shows error in expression so i tried with this:

Sum(IF(Aggr(Count(DISTINCT [id_branz]),[SklepId])<=5,RoznicaWartNettoZakupu,0))  but shows nothing

exaaample.png

It's stocktaking. all i wanted to show its stocktaking in which included only few NazwaBranzy, not all

3 Replies
settu_periasamy
Master III
Master III

Try to split the expression and check it.. then you may know which part is not working. .

avinashelite

try like this

if(count(distinct id_branz)<=5,sum(RoznicaWartNettoZakupu),0)

sunny_talwar

How about this?

Sum(Aggr(If(Count(DISTINCT [id_branz]) <= 5, RoznicaWartNettoZakupu, 0), [SklepId]))