Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 ()
)
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |