Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am having some problems to get the next data:
I have a shop with three registers, In two of thems A is bigger than B and in one of them no. What I want to do is a sum of the number of registers where A is bigger (2). The thing is that if I have the dimension date (dia) selected it does the sum correctly 2.
However, when I Delete the dimension date, which I do not want to show, it gives me 0 and no 2, which is the figure wchich I am searching for.
Thank you.
Best regards.
sum(if(aggr(sum(a)-sum(b),shop,dia)>0,1,0))
It is because the dia field split your data into different rows, if you want the same result you have to aggr by shop and dia
when aggregating =if(A>b,aggr(count(shop),dia,0)) it gives me a hyphen.
Thank you Alessandro.
sum(if(aggr(sum(a)-sum(b),shop,dia)>0,1,0))
Thank you so much Massimo, It is perfect as you write.
When you think you get the answer, please close this discussion by giving Correct and Helpful answers to the posts which are useful for you. It helps others in finding answers for similar scenarios. Thanks and good Qlik.