Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi all,
Im looking for a single measure I can place in a card that displays the average number of items in a group category.
In the dataset below, I'd like the card to display 3 which is the average count of Item Codes per Office Location. Item codes are unique.
Have tried several variants using GROUPBY but no success. Thanks for any help!
Data | Looking for overall average: | |||||
Office Loc code | Office | Item Code | Avg Items | |||
OfficeA | Office location A | A00025 | OfficeA | 4 | ||
OfficeA | Office location A | A00049 | OfficeB | 2 | ||
OfficeA | Office location A | A00073 | OfficeC | 3 | ||
OfficeA | Office location A | A00193 | Overall Average: | 3 | ||
OfficeB | Office Location B | A00313 | ||||
OfficeB | Office Location B | A00385 | ||||
OfficeC | Office Location C | A00409 | ||||
OfficeC | Office Location C | A00481 | ||||
OfficeC | Office Location C | A00505 |
Solved! Go to Solution.
Hi,
pls see below:
Measure = AVERAGEX(VALUES('Table'[Office]), CALCULATE(DISTINCTCOUNT('Table'[Item Code])))
File is attached.
Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Hi,
pls see below:
Measure = AVERAGEX(VALUES('Table'[Office]), CALCULATE(DISTINCTCOUNT('Table'[Item Code])))
File is attached.
Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
That works great - thanks!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
21 | |
14 | |
14 | |
13 | |
13 |