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.
Hi,
I'm brand new to Power BI and DAX and I am running into some trouble attempting to sum a column with a measure based on filtering the table on a different column. I have read online and I think I almost have it, but I am running into an issue getting the final result to be correct.
The column I want to filter on was created from another measure, where it was filled in by comparing two columns in separate tables. The tables are:
Table 1 | |
ID | Pounds |
A | 10 |
B | 10 |
C | 10 |
D | 10 |
E | 10 |
Table 2 | ||
ID | Pounds | In Table 1 |
A | 10 | Y |
B | 10 | Y |
F | 15 | N |
C | 10 | Y |
G | 15 | N |
I used this measure to create the column "In Table 1":
In Table 1 =
IF (
ISBLANK ( LOOKUPVALUE ( 'Table 1'[ID], 'Table 1'[ID], 'Table 2'[ID] ) ),
"N",
"Y"
)
And now I am trying to get the sum of Pounds in Table 2 but only for those ID's not found in Table 1. This is the measure I attempted:
Sampled, Not in Table 1 =
CALCULATE (
SUM ( 'Table 2'[Pounds] ),
FILTER ( 'Table 2', 'Table 2'[In Table 1] = "N" )
)
When I run this measure, rather than get the correct total of 30, I get a blank. If I change the filter to "Y" in the above measure, I get a result of 60, as it sums the entire column regardless of "Y" or "N." I'm not sure if the issue is with the first measure creating the filtering column or in the second measure where I am attempting to filter and sum.
Any help would be greatly appreciated! Thank you!
@SeaDiegoFC , if they are not join
A meausre like
calculate(Sum(Table2[Pounds]), filter(Table2, Table2[ID] in values (Table1[ID]) ))
Hi @amitchandak,
This sums the pounds where the ID's are shared between the two tables, is there a way to have it sum the unique ID's in Table 2 that are not present in Table 1?
Thank you!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
88 | |
52 | |
45 | |
39 | |
38 |