Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello everyone,
Very new to Power BI desktop and PBI in general and wanted to get some insight on a simple problem that I have in regards to creating a quick measure that accurately counts the total of a filtered distinct measure.
For reference here is the problem I am encountering:
report (ID) | outcome (distinct count) |
000111-2024 | 3 |
000112-2024 | 3 |
TOTAL | 4 |
As indicated in the table above, Power Bi is giving me a distinct count of the different types of outcomes (which in my dataset IS actually 4 so this makes sense).
However, I simply want a total count measure of the the sum of the outcomes that are displayed in each report ID. So instead of dispalying 4 as the total, I would like it to display 6 (3 plus 3). Essentially, I'm trying to create a measure where the total distinct count is related to amount of sanctions in the report ID rather than the types of outcomes that are counted.
Don't know If I am doing anything wrong here but if more insight is needed, please let me know. Any would be much appreciated.
Thank you!
Solved! Go to Solution.
If @danextian solution does not work, (it should), try this!
Difference is I speced out the distinct count measure inline.
Outcome Distinct Count =
var _dc = CALCULATE( DISTINCTCOUNT(Table1[outcome]))
RETURN SUMX( VALUES(Table1[Report ID]), _dc)
Hi @investigatorjon ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
If @danextian solution does not work, (it should), try this!
Difference is I speced out the distinct count measure inline.
Outcome Distinct Count =
var _dc = CALCULATE( DISTINCTCOUNT(Table1[outcome]))
RETURN SUMX( VALUES(Table1[Report ID]), _dc)
Try either of these:
=
SUMX (
SUMMARIZE ( data, data[report id], "@count", [distinctcount measure] ),
[@count]
)
=
SUMX ( VALUES ( data[report id] ), [distinctcount measure] )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
58 | |
35 | |
31 |
User | Count |
---|---|
100 | |
59 | |
56 | |
46 | |
41 |