Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello,
I have a one-to-many relationship with the One side being an imported table (unique Transactions) and the Many side (Attachments on Transactions) coming from a direct query. Their relationship is linked on the Transaction ID. Each Transaction can have multiple attachments and this is denoted on the Many side as an Attachment column that is 1 if the attachment exists and 0 if not. Also, not every record that exists on the One side will be present on the Many side and there will be transactions on the Many side that do not exist in the One side as well.
One Side (Unique Transactions)
Transaction
A
B
C
D
E
Many Side (Attachments on Transactions)
Transaction Attachment
A 1
A 0
B 1
B 1
C 0
C 0
X 1
Y 1
How can I create a measure that counts the amount of rows in the one side that does not have an Attachment sum of 2 or more? Keep in mind this model uses Direct Query on the many side.
Solved! Go to Solution.
Strange! However, you may try
=
COUNTROWS (
FILTER (
SUMMARIZE (
Attachments,
Attachments[Transaction],
"@Attachments", SUM ( Attachments[Attachment] )
),
[@Attachments] < 2
&& Attachments[Transaction] IN VALUES ( Transactions[Transaction] )
)
)
Hi @tamerj1 ,
I'm getting the error message "The column 'Transaction' specified in the SUMMARIZED function was not found in the input table".
Attachment is on the many side and Transactions is on the one side of a direct relationship between both tables. Is that correct?
Strange! However, you may try
=
COUNTROWS (
FILTER (
SUMMARIZE (
Attachments,
Attachments[Transaction],
"@Attachments", SUM ( Attachments[Attachment] )
),
[@Attachments] < 2
&& Attachments[Transaction] IN VALUES ( Transactions[Transaction] )
)
)
Hi @RYU209
Please try
=
COUNTROWS (
FILTER (
SUMMARIZE (
Attachments,
Transactions[Transaction],
"@Attachments", SUM ( Attachments[Attachment] )
),
[@Attachments] < 2
&& Transactions[Transaction] <> BLANK ()
)
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |