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
I've created a table from the fields Source and Preparer. If I want to see those sources where there is only one preparer what's is the best way to do it
Like the Sources "MN", "RT" and "PO".
Please note that this is a table I created from my dataset, so if I take the count of Source as the third column that is going to be a huge number.
| Source | Preparer |
| AB | June |
| AB | Jane |
| MN | June |
| SS | Kim |
| SS | Lee |
| SS | Jim |
| RT | Kim |
| PO | June |
| PO | June |
| RT | Kim |
The outcome should be like
| Source | Preparer |
| MN | June |
| RT | Kim |
| PO | June |
Thanks in advance!
Solved! Go to Solution.
@Anonymous you could apply the Power Query solution to other tables/fields. It's a little difficult to answer completely without a complete picture of your entire scenario.
For a DAX solution, you could do something with this...
Table 2 =
FILTER (
SUMMARIZECOLUMNS (
'Table'[Source],
"Count Distinct", DISTINCTCOUNT ( 'Table'[Preparer] )
),
[Count Distinct] = 1
)
Note, this is not a calculated column, this was added as a table via the modelling tab >> New table option but the pattern could equally be added into a calculated column or measure.
I would need more time than I can spend at the moment, maybe someone with more DAX skills could adapt this for you.
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
@Anonymous a DAX Measure solution
newMeasure =
CALCULATE (
DISTINCTCOUNT ( 'Table 1'[Preparer] ),
FILTER (
GROUPBY ( 'Table 1', 'Table 1'[Source], 'Table 1'[Preparer] ),
CALCULATE (
DISTINCTCOUNT ( 'Table 1'[Preparer] ),
ALLEXCEPT ( 'Table 1', 'Table 1'[Source] )
) = 1
)
)
Hi @Anonymous,
You could try this Power Query Solution.
Let me know if this helps or if you have further questions.
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
@KNP thanks for your response,
There is only one Source in Table2 from your solution, but I need 3 sources i.e. "MN", "RT" and "PO" where there is only one preparer for these sources
@Anonymous - I understand now.
I've updated the PBIX file. Please have another look.
Basically this line...
#"Grouped Rows" = Table.Group(Source, {"Source"}, {{"Count", each Table.RowCount(List.Distinct(_[Preparer])), Int64.Type}, {"All", each _, type table [Source=nullable text, Preparer=nullable text]}}),Gets the distinct count.
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
@KNP thanks,
But is there any way to use calculated columns as I've to apply this solution to more fields and that too some are in other tables?
@Anonymous you could apply the Power Query solution to other tables/fields. It's a little difficult to answer completely without a complete picture of your entire scenario.
For a DAX solution, you could do something with this...
Table 2 =
FILTER (
SUMMARIZECOLUMNS (
'Table'[Source],
"Count Distinct", DISTINCTCOUNT ( 'Table'[Preparer] )
),
[Count Distinct] = 1
)
Note, this is not a calculated column, this was added as a table via the modelling tab >> New table option but the pattern could equally be added into a calculated column or measure.
I would need more time than I can spend at the moment, maybe someone with more DAX skills could adapt this for you.
| Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
Calculated column
Count = COUNTROWS( FILTER( Table1, Table1[Source] = EARLIER( Table1[Source] ) ) )
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi @CNENFRNL thanks for your reply
But when I apply this in my dataset I got a huge value for the sources MN, RT and PO. I think based on your formula I get the total count of Sources in my dataset,
I've updated my question for a better understanding
I've applied the formula to the updated dataset and now I get this count
Even though the Sources RT and PO has only one preparer, the count shows 2.
Hi @Anonymous
is this good!?
It is a measure though, not an added column
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
@aj1973 thanks,
If I filter on the basis of count I'll get the source "MN", but in fact, there is "RT" and "PO" where there is only one preparer. even though they are occurring multiple times in the record, still RT and PO only contains 1 preparer
@Anonymous
Can you screen shot or represent the out come you want to see?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
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!