Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello,
I have a measure that compares the values of two columns from different tables, and returns whether the values match or not.
and this is what I receive when I add in the measure:
the rows in the red box should not appear, because they are being filted out by the filter I have on Field A.
How do I ensure that the measure takes this into account (short of just filtering out for blank records, which could lead to lost data).
Thank you in advance!
Solved! Go to Solution.
Gotcha, I missed that part!
I think the KEEPFILTERS function should do the trick. Something like:
the problem with your solution is that the filter field is only in table 2, its not in table 1. Does that provide you with any insight?
scratch that, my bad, I still had the filter on for the blank values. The KeepFilters piece didn't seem to do anything to the table.
That worked! Thank you so much
I think adding a function to consider whether the Amount fields are null would do the trick. The below wouldn't produce a result if either _Table1 and _Table2 aren't null. Replace the || with && if you want to only produce a result where both _Table1 and _Table2 have a value.
PCAP Amount Match =
VAR _Table1 = SUM(Table1[Amount])
VAR _Table2 = SUM(Table2[PCAP Amount])
RETURN
IF(
ISBLANK(_Table1) || ISBLANK(_Table2),
BLANK(),
IF(ROUND(_Table1, 2) = ROUND(_Table2, 2), "Match", BLANK())
)
@ArtisanAmbrosia thanks for the reply! The problem is, some of the all blanks further down in the table I want to keep, so it's not as simple as just filtering out the blanks (as stated above). I need it to review the filter and act accordingly (if possible). Is there somewhere I can incorporate that filter into the measure? It doesn't sees so because the filter reviews each row, there is no aggregation expression in it.
Gotcha, I missed that part!
I think the KEEPFILTERS function should do the trick. Something like:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
82 | |
66 | |
66 | |
39 | |
39 |