Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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.
  • 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.

1 Reply

  • 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.