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.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
20 | |
18 | |
16 | |
13 | |
10 |