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

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

Reply
Alaska1
Frequent Visitor

Averages in graph by two Categories

I am a new user to Power Bi.

 

I have a data field with a scale from 1-10.  I can get the overall average on my graph but I need to break it down by two other Categories.

 

Sales - Branch Avg. 4.3

Online - Store Avg 6.3

 

Do I have to create a measure?

 

Thank you!

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Alaska1 ,

Based on my testing again, please try the following methods again:

1.Create the sample table.

vjiewumsft_0-1719539252250.png

2.Create the new measures to calculate the average.

BranchAvg = AVERAGEX(FILTER('Table', 'Table'[Category] = "Sales"), 'Table'[Scale])
Store Avg = AVERAGEX(FILTER('Table', 'Table'[Category] = "Online"), 'Table'[Scale])

3.Drag the measure into the column chart. The result is shown below.

vjiewumsft_1-1719539262054.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

Anonymous
Not applicable

Hi @Alaska1 ,

Based on the description, please try the following DAX formula for multiple items.

AverageMeasure = 
CALCULATE (
    AVERAGE('Table'[Scale]),
    FILTER(ALLSELECTED ('Table'), 'Table'[Category] = MAX ('Table'[Category]) )
)

Drag the measure into the Y-axis. The result is shown below.

vjiewumsft_0-1719820428330.png

vjiewumsft_1-1719820463983.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Alaska1
Frequent Visitor

Thank you!  The field has more than sales and online.  Is there a way for me to group by category field so I don't have do one for more than the two?  Can the formula group by Category Field and then do the average?

Thank you again for your quick response.

Anonymous
Not applicable

Hi @Alaska1 ,

Based on the description, please try the following DAX formula for multiple items.

AverageMeasure = 
CALCULATE (
    AVERAGE('Table'[Scale]),
    FILTER(ALLSELECTED ('Table'), 'Table'[Category] = MAX ('Table'[Category]) )
)

Drag the measure into the Y-axis. The result is shown below.

vjiewumsft_0-1719820428330.png

vjiewumsft_1-1719820463983.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you!  

Anonymous
Not applicable

Hi @Alaska1 ,

Based on my testing again, please try the following methods again:

1.Create the sample table.

vjiewumsft_0-1719539252250.png

2.Create the new measures to calculate the average.

BranchAvg = AVERAGEX(FILTER('Table', 'Table'[Category] = "Sales"), 'Table'[Scale])
Store Avg = AVERAGEX(FILTER('Table', 'Table'[Category] = "Online"), 'Table'[Scale])

3.Drag the measure into the column chart. The result is shown below.

vjiewumsft_1-1719539262054.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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