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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
=
IF (
order_details[PRODUCT_CATEGORY] = "Trial",
0,
IF (
order_details[PRODUCT_CATEGORY] = "Trial Completion",
1,
IF (
order_details[PRODUCT_CATEGORY] <> "Rebill",
-5,
RANKX (
FILTER (
order_details,
order_details[Unique_Key] = EARLIER ( order_details[Unique_Key] )
&& RELATED ( products[PRODUCT_CATEGORY] ) = "Rebill"
&& order_details[ORDER_STATUS] <> "DECLINED"
&& order_details[IS_TEST_ACTUAL] = "N"
),
order_details[order_id],
,
ASC
) + 1,
)
)
)
)
Hi, @Anonymous
For now, your dax formula involves two or more tables. In powerbi M query, you will most likely need to create a new query to associate the two tables(order_details and products). It is recommended to provide sample data for further research.
Best Regards,
Community Support Team _ Eason
Hi,
lets say, this is from one table.
=
IF (
order_details[PRODUCT_CATEGORY] = "Trial",
0,
IF (
order_details[PRODUCT_CATEGORY] = "Trial Completion",
1,
IF (
order_details[PRODUCT_CATEGORY] <> "Rebill",
-5,
RANKX (
FILTER (
order_details,
order_details[Unique_Key] = EARLIER ( order_details[Unique_Key] )
&& order_details[PRODUCT_CATEGORY] = "Rebill"
&& order_details[ORDER_STATUS] <> "DECLINED"
&& order_details[IS_TEST_ACTUAL] = "N"
),
order_details[order_id],
,
ASC
) + 1,
)
)
)
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 74 | |
| 66 | |
| 65 |