Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
71 | |
37 | |
21 | |
19 | |
15 |
User | Count |
---|---|
125 | |
33 | |
27 | |
24 | |
23 |