Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
33 | |
16 | |
13 | |
10 | |
8 |
User | Count |
---|---|
59 | |
20 | |
12 | |
11 | |
10 |