Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi all
I have a measure called "Delta Capacity & OU Demand" that calculates the difference between capacity & demand. Any negative value should be a lost in sales.
What I need is a measure that returns me the sum of those potential lost sales. The potential lost sales would be when demand is above capacity or in other words when the capacity saturation is >=100%
Here is the table sample. As seen below in only one month we have a saturation above 100% and it is in december 2028. The column of "delta capacity & OU demand " has a negative of 2.1 Million.
Therefore the "Potential lost sales" measure should only return the sum of the 2.1 million of lost sales.
I created the follwing measure:
Potential Lost Sales KO Demand = 
SUMX(
    SUMMARIZE(
        'SKU by line - Official',
        'SKU by line - Official'[Date],
        'SKU by line - Official'[Country Of Manufacturing],
        'SKU by line - Official'[Manufacturing plant of production],
        'SKU by line - Official'[Manufacturing line],
        'SKU by line - Official'[Package All]
    ),
IF([Saturation KO year 1]>=1,
[Delta Capacity & OU Demand],
0
)
)
The If basically says (or at least I want to have) is if the saturation on the given month is over 100% then sum the lost sales.
How ever the value i get is: 44 million. Too much!
Any idea how to get this work?
Thanks.
Solved! Go to Solution.
@o59393 you can try this, might need further tweaking
Potential Lost Sales KO Demand = 
VAR __Table =
ADDCOLUMNS ( 
    SUMMARIZE(
        'SKU by line - Official',
        'SKU by line - Official'[Date] 
    ),
    "@Saturation KO", [Saturation KO year 1],
    "@Delta Capacity & OU Demand", [Delta Capacity & OU Demand]
)
RETURN
SUMX ( 
  FILTER( __Table, [@Saturation KO] > 1 ),
  [@Delta Capacity & OU Demand]
)Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
It would help to get an idea of how your data model is structured and how the measure for [Delta Capacity & OU Demand] is defined. Assuming your main table is called 'SKU by line - Official' (replace if it's something else),
Have you considered this approach:
Potential Lost sales = calculate([Delta Capacity & OU Demand],Filter('SKU by line - Official',[Delta Capacity & OU Demand]<0))
@o59393 you can try this, might need further tweaking
Potential Lost Sales KO Demand = 
VAR __Table =
ADDCOLUMNS ( 
    SUMMARIZE(
        'SKU by line - Official',
        'SKU by line - Official'[Date] 
    ),
    "@Saturation KO", [Saturation KO year 1],
    "@Delta Capacity & OU Demand", [Delta Capacity & OU Demand]
)
RETURN
SUMX ( 
  FILTER( __Table, [@Saturation KO] > 1 ),
  [@Delta Capacity & OU Demand]
)Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 90 | |
| 49 | |
| 37 | |
| 31 | |
| 30 |