Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
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])
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
9 | |
9 | |
6 | |
5 |
User | Count |
---|---|
17 | |
14 | |
10 | |
9 | |
8 |