Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
Few months ago I posted a question and I got the write answer.
How to tag Orders with YES/NO if customer name is same?
This question relates to the above mentioned post.
What would be the right expression to count to total orders where following fields are same?
[OrderDate], [Name], [StoreName]
I tried following but I am getting incorrect totals
Count(TOTAL <Name,OrderDate,StoreName> OrderId) > 1
May be this:
=Count(DISTINCT Aggr(If(Count(TOTAL <Name,OrderDate,StoreName> OrderId) > 1, OrderId), OrderId, Name, OrderDate))
&
=Count(DISTINCT Aggr(If(Count(TOTAL <Name,OrderDate,StoreName> OrderId) = 1, OrderId), OrderId, Name, OrderDate))
Can you share a sample app please
May be
COUNT(TOTAL <Name, OrderDate, StoreName>DISTINCT OrderID)
Perhaps like this:
count({<OrderId={"=count(distinct [OrderDate]&'|'& [Name] &'|'& [StoreName]) )<>count([OrderDate]&'|'& [Name] &'|'& [StoreName])"}>}distinct OrderId)
Thank you guys but your suggested solution does not work.
I have attached an example QVD in the post
Can you please try that?
Thank you
Hi Lokesh,
Try this:
Sum(Aggr(if(Count(OrderId)>1,1,0),Name,OrderDate,StoreName))
good luck
Andrew
=sum(aggr(if(Count(TOTAL <Name,OrderDate,StoreName> OrderId) > 1,1,0),OrderId,Name, OrderDate))
May be this:
=Count(DISTINCT Aggr(If(Count(TOTAL <Name,OrderDate,StoreName> OrderId) > 1, OrderId), OrderId, Name, OrderDate))
&
=Count(DISTINCT Aggr(If(Count(TOTAL <Name,OrderDate,StoreName> OrderId) = 1, OrderId), OrderId, Name, OrderDate))
Thanks it is working ![]()
And where can I modify this expression to get the count of the rest of the orders where those 3 fields are not same.
Thanks mate.