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.
Hello, all!
I have the following table
And im trying to get a simple DISTINCT COUNT[ID] but its not working because the column Type has two different values (B and E).
If i use a mesure, it works BUT im trying to use a Column because after i get the distinct count, ill need get the average.
Like the example below:
In short, i need to get the average of distinct count[id].
Ive tried create a column with
Solved! Go to Solution.
Hi @malone_henrique,
Try this piece of code:
In plain text:
Avg_Distinct_ID =
VAR _tbl = SUMMARIZE ( 'Table', [Year], [Month], "dValue", DISTINCTCOUNT ( 'Table'[ID] ) )
RETURN AVERAGEX ( _tbl, [dValue] )
Best Regards,
Alexander
Hi @malone_henrique,
Try this piece of code:
In plain text:
Avg_Distinct_ID =
VAR _tbl = SUMMARIZE ( 'Table', [Year], [Month], "dValue", DISTINCTCOUNT ( 'Table'[ID] ) )
RETURN AVERAGEX ( _tbl, [dValue] )
Best Regards,
Alexander
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 |
---|---|
47 | |
27 | |
23 | |
13 | |
8 |
User | Count |
---|---|
73 | |
51 | |
45 | |
16 | |
12 |