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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
xuexi1890
Helper I
Helper I

Middle number Qty wise

Hello,

I want to use a measure to extract a middle price at Qty wise, and respond to the filters (Year, sales area etc.)

below is a summary table:

Price           Sum of Resale Qty                 % of Accu. Resale Qty/Grand Total

0.50                  849,305                                           16.5%

0.56                  835,188                                           32.7%

0.59                  315,704                                           38.8%

0.60                  152,779                                           41.8%

0.61                  248,481                                           46.6%

0.70                  932,176                                           64.6%

0.77                  572,559                                           75.8%

0.80                  669,245                                           88.7%

0.81                  581,025                                           100.0%

 

0.7 is the price i want to have.

 

I am now using a stupid and not interactive way to extract this info:

  1. Create a summary table as above, and use running total to calculate the percentage;
  2. Export the table, use a measure to calcuate the min price when the accumulated % is >=50%

Please please help!

Thank you in advance!

 

Regards

Nate

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @xuexi1890 ,

 

You can create measures like DAX below.

 

% of Accu. Resale Qty/Grand Total = CALCULATE(DIVIDE(SUM('Table'[Sum of Resale Qty]),CALCULATE(SUM('Table'[Sum of Resale Qty]),ALL('Table'))),FILTER(ALLSELECTED('Table'),'Table'[Price]<=MAX('Table'[Price])))
 
Middle number Qty = CALCULATE(MIN('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[% of Accu. Resale Qty/Grand Total]>=0.5))

 

3.png

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @xuexi1890 ,

 

You can create measures like DAX below.

 

% of Accu. Resale Qty/Grand Total = CALCULATE(DIVIDE(SUM('Table'[Sum of Resale Qty]),CALCULATE(SUM('Table'[Sum of Resale Qty]),ALL('Table'))),FILTER(ALLSELECTED('Table'),'Table'[Price]<=MAX('Table'[Price])))
 
Middle number Qty = CALCULATE(MIN('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[% of Accu. Resale Qty/Grand Total]>=0.5))

 

3.png

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors