Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I´m developing an analysis tht will allow me to identify a production sequency based on times.
I aready have a formula that works, with the correct fields and filters, but when I try to force rank to be sorted ascending the formula lose the filter.
Original:
RANKX(filter('PRODUCTION ORDERS';'PRODUCTION ORDERS'[Sequence_key]=EARLIER('PRODUCTION ORDERS'[Sequence_key]));'PRODUCTION ORDERS'[Sequence_S1];;)
When I force ascending:
RANKX(filter('PRODUCTION ORDERS';'PRODUCTION ORDERS'[Sequence_key]=EARLIER('PRODUCTION ORDERS'[Sequence_key]));'PRODUCTION ORDERS'[Sequence_S1];;1) it lose the ranking tby subcategory sequence_key.
Thank you so much,
Cheers,
Fátima
Hi @Anonymous,
Please check the formula as below. If it doesn't meet your requirement, kindly share your sample data to me.
RANKX(CALCULATETABLE('PRODUCTION ORDERS',filter('PRODUCTION ORDERS';'PRODUCTION ORDERS'[Sequence_key]=EARLIER('PRODUCTION ORDERS'[Sequence_key])));'PRODUCTION ORDERS'[Sequence_S1];;1)
Regards,
Frank
Hi there,
Thank you very much, but with your formula I lose the filter, so what it does is a kind of overall ranking instead of a ranking by category.
As you can see below, teste is the field that I get with your formula, Sequence_S1 is my oriinal formula, so I know for sequence_key 3910L01 I have 36 lines and they are correctly descending sorted, but I need them ascendling sorted.
If you see for the next category Sequence_key=4010L1 I have 36 lines... So the subranking by category are working, only the sort is failing.
Thank you very much for your support.
Fátima
My data is this:
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!