Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Measure to compare text strings

I have two tables joined on Doc_no

 

Table 1

Doc_no

Description

Serial_Number  (text string)

 

Table 2

Doc_no

Description

PN_Serial_Number  (text string)

I want to find out when Table 1 Serial_Number does not match Table 2 PN_Serial_number. I assume I need to create a measure with an IF statement, Y if they match and N if they don't; put that measure in the "Filters" section to do the filter.  I just can't make the measure work.

Capture.PNG

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

A measure can't be used in Visual/Page/Report level filters pane, only columns can be placed.

 

In your scenario, assume the relationship between the Table1 and Table2 is 1:n, you can create a calculated column in Table2 like below below:

 

Condition = IF('Table2'[PN_Serial_Number]=RELATED(Table1[Serial_Number]),"Y","N")

 

Then drag this column to the Visual Level Filters pane, select "N" value.

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

A measure can't be used in Visual/Page/Report level filters pane, only columns can be placed.

 

In your scenario, assume the relationship between the Table1 and Table2 is 1:n, you can create a calculated column in Table2 like below below:

 

Condition = IF('Table2'[PN_Serial_Number]=RELATED(Table1[Serial_Number]),"Y","N")

 

Then drag this column to the Visual Level Filters pane, select "N" value.

 

Best Regards,
Qiuyun Yu

 

 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.