Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Please help my problem,
I calculate measure column distinct count of device_id with a formula:
#_D Mobile + Wifi = CALCULATE(
DISTINCTCOUNT(f_mw_202301_202404[device_id]),
FILTER(f_mw_202301_202404,
f_mw_202301_202404[category]= "Buy" || f_mw_202301_202404[category]= "Use"))
Value
I build visual Matrix and input #_D Mobile + Wifi in Values as image:
As shown, column subtotals and row subtotals are still distinct count (based on column and row contents). The expected result is column subtotals and row subtotals is the sum of the value of each column and row contents.
Thanks in advance.
Solved! Go to Solution.
Hi @utsurur ,
You can try this measure.
#_D Mobile + Wifi =
SUMX (
CROSSJOIN (
VALUES ( 'Table'[Matrix Row Field] ),
VALUES ( 'Table'[Matrix Column Field] )
),
CALCULATE (
CALCULATE (
DISTINCTCOUNT ( f_mw_202301_202404[device_id] ),
FILTER (
f_mw_202301_202404,
f_mw_202301_202404[category] = "Buy"
|| f_mw_202301_202404[category] = "Use"
)
)
)
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hi @utsurur ,
You can try this measure.
#_D Mobile + Wifi =
SUMX (
CROSSJOIN (
VALUES ( 'Table'[Matrix Row Field] ),
VALUES ( 'Table'[Matrix Column Field] )
),
CALCULATE (
CALCULATE (
DISTINCTCOUNT ( f_mw_202301_202404[device_id] ),
FILTER (
f_mw_202301_202404,
f_mw_202301_202404[category] = "Buy"
|| f_mw_202301_202404[category] = "Use"
)
)
)
)
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
If you use Measure, output will be like this only. To solve, First Create a summarize table with the same dax and then refer that table in matrix to get your desired result.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 20 | |
| 13 | |
| 10 |