Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |