Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
In my orders table, I have the order_id and a sub-order id created if the customer has sent a Laptop along with his/her Mobile which is our main service. Both orders have the exact pickup date, but different order_ID.
I need to know whether the first order of all our customers has a laptop included. I did order ranking through this DAX formula:
@amitchandak it didn't work.
Maybe I asked the question wrong.
How about how can I filter the orders table where if order rank 1 and order rank 2 have the same pickup date, then sum the laptop contribution?
@Andrew_na_lang ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Is there any blank value, not sure why you are getting rank as 2
@amitchandak here's a sample table.
The goal is to mark all customers with LAPTOP in their first order, be it main order or sub-order id.
@Andrew_na_lang , Try like
RANKX ( Filter(Orders, Orders[customer_id] = earlier(Orders[customer_id]) && [Laptop_contribution] =0 && not(isblank([Laptop_contribution] )) ), orders[time_pickup_id].[Date],, ASC )
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
33 | |
15 | |
14 | |
13 | |
9 |
User | Count |
---|---|
60 | |
23 | |
22 | |
19 | |
13 |