Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
please help me out in
Comparing the current month top n values to the previous months
Like this:
sum({<IsRolling3={1},Country={"=rank(sum({<IsCurrent={1}>} Orders),4,1)<4"}>} Orders)
Just a typo, perhaps. You're doing sum(country) instead of sum(Orders).
As John, say you need change Country by Orders
Hi john i tried the other way as well but no luck
Can u pls help me
I didnt get that can you pls explain
In your expression you have "country" and is "orders"
Its not geeting yhe correct results
Perhaps like this:
sum({<country={"=rank(Sum({<OrderDate={'>=$(MonthStart(Max(OrderDate))))<=$(=Date(Max(OrderDate)))'}>}Orders))<4"},
OrderDate={'>=$(MonthStart(Max(OrderDate),-2)))<=$(=Date(Max(OrderDate)))'}>}Orders)
Hi,
Try this expresion : sum({<country={"=rank(aggr(Sum(Orders), country), 4, 1)<=3"}>} Orders)
Aurélien
When I fix the expression as I suggested, I get the results you requested. The only difference I see is they aren't sorted in the order you show. If that's important to you, sort your second dimension like this:
rank(sum({<MonthYear={"$(=max(MonthYear))"}>} Orders),4,1)
I think you can also just use this as your expression:
sum(Orders)