cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Regular Visitor

## Unit sales by product formula

Hello

I have a table shows the products name and I want to know what is the product percentage from all the quantity sold.

the formula is Unit Sales by Product (%) = Product Quantity Sold/ total Quantities Sold

but I dont know how to write it as a measure. I need your help

1 ACCEPTED SOLUTION
Super User

Hi,

To your visual, drag the product name column from the Data Table and write these measures

Qty sold = sum(Data[Quantity])

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
3 REPLIES 3
Community Support

Hi @Aha2022 ,

measure =
var Product Quantity Sold = calculate(sum(sales),allexcept(table,[product]))

var total Quantities Sold = calculate(sum(sales),all(table))

return
Product Quantity Sold/Quantities Sold

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Super User

Hi,

To your visual, drag the product name column from the Data Table and write these measures

Qty sold = sum(Data[Quantity])

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Super User

@Aha2022 , The measure should be

Unit Sales by Product (%) = Divide(Sum(Table[Product Quantity Sold]), Sum(Table[total Quantities Sold]))

Assume above are columns

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors