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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Not applicable

Adding certain rows from a table using a condition

Imagine I have a table that has two columns, Units Sold and Product :


      Units Sold        Product

           3                   Fruit

           5                   Beverage

           2                   Fruit

           1                   Fruit

           4                   Beverage

           7                   Sweets


What is the right DAX expression that will give me the average number of sold units of each product type?

So the output that I want to get is a plot of average unit sold vs product type, where the average for fruit is 3.67, 3.14 for sweets, and 2.44 for fruit.




Advocate I
Advocate I

Hi Johnray,


I don't  think that you need to create a measure for this.

You can simply create a bar chart in PowerBI and drag your existing measure "Unit Sold" in Value and "Product" into the Axis part then by clicking on "UnitSold" you can set the summarization to average.



You can still create a measue if you want: Measure = AVERAGE(Table1[UnitSold]) 





Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.


Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors