Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys.
I'm new to this, and I'm trying hard to find an answer. Sorry if this is a common problem.
I have database like this: Seller, OrderID, YearSale
I'm tyring to display the number of sales of the best seller in the last year (of the filtered years, I need only the last one).
I came up with:
=count( { <YearSale={$(=num(max(YearSale)))}> + <FirstSortedValue(Seller, -Aggr(count({$<YearSale={$(=Max(YearSale))}>} distinct OrderID), Seller)) > } distinct [OrderID])
I think I'm doing something simple in a hard way and honestly I don't know what's actually happening here.
I'd apreciate any help.
try below
= FirstSortedValue(count({$<YearSale={$(=Max(YearSale))}>} distinct OrderID) , -Aggr(count({$<YearSale={$(=Max(YearSale))}>} distinct OrderID), Seller))
OR
=Max ( AGGR( count({$<YearSale={$(=Max(YearSale))}>} distinct OrderID) , Seller) )
try below
= FirstSortedValue(count({$<YearSale={$(=Max(YearSale))}>} distinct OrderID) , -Aggr(count({$<YearSale={$(=Max(YearSale))}>} distinct OrderID), Seller))
OR
=Max ( AGGR( count({$<YearSale={$(=Max(YearSale))}>} distinct OrderID) , Seller) )
Many thanks! It worked