Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Formula to sum all sales with Max and all sales with Min price

Hello 

I am trying to report price elasticity in PowerBi.  I looked at posts and and used this formula for the qty at min price

Qty Min Price = CALCULATE(SUM('Total Fuel Sales'[Qty]),FILTER(VALUES('Total Fuel Sales'[Price/Gal]),MIN('Total Fuel Sales'[Price/Gal])= [Min Price]))
 
It give me the quantity of just one sale at the min price instead of summing qty for all sales at that price.
What formula will give me the sum?
 
BTW: The Total Fuel Sale table has with a row for each sale
3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may try using SUMMARIZE Function inside the SUMX Function.

https://community.powerbi.com/t5/Desktop/Show-Top-N-values-only-in-a-new-table-monthly-average-of-daily/m-p/233772#M104113

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Could you give me an example with the following 

ProductRegionDateInvoiceQtyPrice/Gal  
Jet FuelGLN1/1/201912100 $      1.00  
Jet FuelGLN2/1/201942100 $      1.00  
Jet FuelGLN1/12/20191320 $      2.00  
Jet FuelJax2/12/20191420 $      1.00  
Jet FuelJax1/12/20191530 $      2.00  
GasGLN1/1/20191640 $      1.00  
GasGLN2/12/20191750 $      2.00  
GasJax2/12/20191860 $      1.00  
GasJax2/12/201944200 $      1.00  
GasJax1/12/20191970 $      2.00  
        
        
Expected Results      
Slicers: Jet Fuel and GLN and 2019     
Qty at min price200      
        
Slicers: Jet Fuel all regions and 2019     
Qty at min price220      
        
Slicers: Gas and Jax and 2019     
Qty at min price260      
        
        
Slicers: Jet Fuel and GLN and Jan 2019     
Qty at min price100      
        
        
Anonymous
Not applicable

I am sorry to say I don't understand how to use the summarize for this... or any solution. I am new to DAX.  I read the Mircorsoft explanation but still puzzled. I just watned to respond since you were kind to answer. 🙂 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.