Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
12 | |
10 | |
8 |
User | Count |
---|---|
24 | |
17 | |
11 | |
11 | |
10 |