Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi,
I'm going to start with my original issue and maybe there is a simplier solution.
I'm using this formula to return QtyGood from the previous step:
Previous Step Qty =
IF (
Query2[PrevStepSequenceNum] = 0,
Query2[StepQtyDue],
LOOKUPVALUE (
Query2[QtyGood],
Query2[OrderNum], Query2[OrderNum],
Query2[OrderStepSequenceNum], Query2[PrevStepSequenceNum],0
)
)It works great unless there are two values returned as you can see in this picture:
How can I have the alternate value for the Lookup to return the sum of these rows(1710 + 6220 = 7930)?
My first thought was to make a custom column that would sum the QtyGood based on the OrderNum and OrderStepSeqNum columns matching. But I don't know how to do this?
Is there an easier way, if not how can I create this custom column?
Thank you,
-Justair07
Solved! Go to Solution.
Hi @Justair07 ,
It seems like you have set a static value as the result when lookupvalue not work, I'd like to suggest you use sum(Query2[QtyGood]) to return summary result.
Previous Step Qty =
IF (
Query2[PrevStepSequenceNum] = 0,
Query2[StepQtyDue],
LOOKUPVALUE (
Query2[QtyGood],
Query2[OrderNum], Query2[OrderNum],
Query2[OrderStepSequenceNum], Query2[PrevStepSequenceNum],
SUM ( Query2[QtyGood] )
)
)
Regards,
Xiaoxin Sheng
Hi @Justair07 ,
It seems like you have set a static value as the result when lookupvalue not work, I'd like to suggest you use sum(Query2[QtyGood]) to return summary result.
Previous Step Qty =
IF (
Query2[PrevStepSequenceNum] = 0,
Query2[StepQtyDue],
LOOKUPVALUE (
Query2[QtyGood],
Query2[OrderNum], Query2[OrderNum],
Query2[OrderStepSequenceNum], Query2[PrevStepSequenceNum],
SUM ( Query2[QtyGood] )
)
)
Regards,
Xiaoxin Sheng
@Anonymous I can't belive it was that simple. I didn't think that alternate value still took into consideration the previous conditions. thankyou so much!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |