Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Alright, I can't seem to wrap my head around solving this one so hopefully someone out there can help.
I have groups of tickets in multiple sections.
Color Group | # of seats | Section |
Tan | 6 | 300 |
Tan | 20 | 301 |
Tan | 20 | 302 |
Purple | 15 | 201 |
Purple | 15 | 202 |
Then I also have people buying tickets
Receipt # | Color Group | Amount of tickets |
1 | Tan | 5 |
2 | Tan | 4 |
3 | Purple | 2 |
I'm trying to figure out how to calculate a running total of remaining tickets and whether or not each receipt can sit together (they have to be able to sit together). So for example Receipt #1 has bought 5 of the 6 tickets in section 300 so I need to reduce 300 to 1 remaining ticket so when I'm assigning Receipt 2 I'll know I don't have enough tickets remaining to sit them in 300 so they'll need to go to 301 and then reduce 301 by 4 tickets. I hope that makes sense!
Hi, @davidgaribaldi
this issue of yours requires looping, doesn't it? That is pretty tricky in DAX, but it is doable. Here is how loops can be implemented: https://community.powerbi.com/t5/Community-Blog/For-and-While-Loops-in-DAX/ba-p/636314
Cheers,
Sturla
User | Count |
---|---|
93 | |
88 | |
68 | |
62 | |
58 |
User | Count |
---|---|
149 | |
113 | |
95 | |
80 | |
72 |