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
I'm not even sure if this is possible in PowerQuery. Previously I was doing this in SQL in a cursor, but I'd like a standalone PowerBI solution.
Basically, I'd like a column that specifies which "Trade" each row belongs to. Each time the MaxOpenQuantity = MaxClosedQuantity for each Symbol, the loop iterates.
This is the data set.
This is the desired outcome
Is this achievable in PowerQuery?
Hi @WJames ,
Sorry I'm not quite clear about the calculation logic of result "Trade". For flag 1, the Max Open Quantity equals Max Closed Quantity, so the Trade increases by 1. But for flag 2, the Max Open Quantity isn't equal to Max Closed Quantity, why the result is 3?
Best regards,
Community Support Team_yanjiang
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |