Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am building a straight table to show top 10 orders, and also includes their information (such as product, customer).
I've tried these 2 methods but both of them did not get the correct top orders.
1. Click the order_number and limit to top 10.
2. Use Ranking expression.
The formula I used:
=AGGR(
RANK(
Sum(
{<
BUSINESS={'A', 'C', 'D'},
YEAR={$(=YEAR(TODAY()))},
MTD_FLAG={'Y'}
>}
ORDER_AMOUNT
)
,0,1),
BUSINESS,
ORDER_NUMBER
)
Hi @yyw
The first one should always work if the limitation is being done on the correct calculation. For the second one, I would need to see the raw data to reproduce it. Could you, please, attach it or the app with the object if possible?
Kind Regards
Daniel
It is a bit hard to troubleshoot without knowing more about the data and your selections.
What is MTD orders? Is it an expression or a recalculated dimension value? How is that calculation done?
I notice this set modifier:
YEAR={$(=YEAR(TODAY()))}, MTD_FLAG={'Y'}
The screenshot reveal nothing about those values in your selections. Could it be that the "faulty" blank doesn't meet the correct YEAR and MTD_FLAG criteria?
Use this in calculated dimension
=If(
Aggr(
Rank(
Sum({<BUSINESS={'A','C','D'}, YEAR={$(=Year(Today()))}, MTD_FLAG={'Y'}>} ORDER_AMOUNT)
,0,1),
ORDER_NUMBER
) <= 10,
ORDER_N
UMBER
)