The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!
Solved! Go to Solution.
Hi @Alaska1 ,
Based on my testing again, please try the following methods again:
1.Create the sample table.
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.
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.
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.
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! 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.
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.
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!
Hi @Alaska1 ,
Based on my testing again, please try the following methods again:
1.Create the sample table.
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.
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.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
14 | |
10 | |
10 | |
9 |