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
Anonymous
Not applicable

Create measure in Power BI

I am working on Sample Superstore dataset where I have Sales, Quantity, Profit and discount. I will need to calculate sales per quantity, profit per quantity and discount per quantity.

 

I'm currently doing this - 

Sales per Qty = SUM(Orders[Sales])/SUM(Orders[Quantity])
 
The result of this is same for all the records in the column. This approach is incorrect and I will need your guidance to rectify it. Kindly share your ideas.
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You should write that as a measure (not as a calculated column formula).  Also, break down your measures to:

Revenue = SUM(Orders[Sales])

Qty sold = SUM(Orders[Quantity])

Rev per unit = divide([Revenue],[Qty sold])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

You should write that as a measure (not as a calculated column formula).  Also, break down your measures to:

Revenue = SUM(Orders[Sales])

Qty sold = SUM(Orders[Quantity])

Rev per unit = divide([Revenue],[Qty sold])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.