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.
Hey guys,
Immediate request,
I have a matrix table, I'm using distinct count for my column(Hours column). I would need to sum column subtotal (5, 7,9,7,8) =36
Pls help!
Solved! Go to Solution.
Hi @Anonymous ,
Please reference this to have a try.
(Replace "Product" with your "Hour" column)
Distinct count =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Product] ),
ALLSELECTED ( 'Table'[Date].[Month] )
)
Total values =
VAR t =
SUMMARIZE (
'Table',
'Table'[Date].[Month],
'Table'[Product],
"distinct count", [Distinct count]
)
RETURN
SUMX ( t, [Distinct count] )
@Anonymous , you should give a better screenshot and date
You have try like
sumx(summarize(Table, Table[row],table[col],"_1",distinctCOUNT(Table[Col1])),[_1])
Here Table[row],table[col] are your group by , you have given in matrix row and column, They can be one or many as per need
apologies for the screenshot.
i did use your measure but seems like it not solving my purpose.
attaching the SC, left is with the help of measure you suggessted, right one is original. I need unique hour counts but it seems like with the measure it counting the hours.
Hi @Anonymous ,
Please reference this to have a try.
(Replace "Product" with your "Hour" column)
Distinct count =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Product] ),
ALLSELECTED ( 'Table'[Date].[Month] )
)
Total values =
VAR t =
SUMMARIZE (
'Table',
'Table'[Date].[Month],
'Table'[Product],
"distinct count", [Distinct count]
)
RETURN
SUMX ( t, [Distinct count] )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
85 | |
66 | |
52 | |
47 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |