Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I Have a Simple Requirement , Where i Have a Product A and B ... My requirement is if sum of Product A is greater that B Than Count no of Branch,
Tab1:
Load * inline [
Branch,Product,sale,Sale1
a,A,100,200
b,A,200,120
c,B,300,230
d,A,400,401
d,B,401,500
e,A,500,497
f,A,501,203
];
i am Using a Expression as in text object
=Count(if(sum({<Product={'A'}>}sale)>=sum({<Product={'A'}>}sale1),Branch))
But i am getting an error that nested Aggregation not Allowed..
Output should be 5.
As well i am attaching an qvw.
In fact shouldn't it be just 3? Try this
=Count({<Branch = {"=Sum({<Product={'A'}>}sale) >= Sum({<Product={'A'}>}Sale1)"}>} Branch)
Please try this:
=Count(aggr(if(sum({<Product={'A'}>}sale)>=sum({<Product={'A'}>}sale1),
Branch),Branch))
Is the output 5 or 4?
=Count(Aggr(If(sum({<Product={'A'}>}sale)>=sum({<Product={'A'}>}Sale1), Branch), Branch)
Shouldn't it be just a, b, e, and f?
Change the order of your Expression
=if (sum({<Product={'A'}>}sale)>=sum({<Product={'A'}>}sale1), count(Branch))
In fact shouldn't it be just 3? Try this
=Count({<Branch = {"=Sum({<Product={'A'}>}sale) >= Sum({<Product={'A'}>}Sale1)"}>} Branch)
=Sum(Aggr(if(sum({<Product={'A'}>}sale)>=sum({<Product={'A'}>}sale1),1,0),Branch))
Please don´t consider my last answer