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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
mshashmi
Frequent Visitor

Using where clause

Hi

 

I want to make a visual where I want something like 'where' clause. 

Suppose I have two tables and I want those rows from table1 where table1.column1=table2.column3

 

Can it be done using conditions or do I need to merge both tables?

1 ACCEPTED SOLUTION

Hi @mshashmi,

You can use CROSSJOIN function as follows.


First, change your column header name, which make them different in different tables. Because, crossjoin function is unsupported for same column names.

2.PNG

Then, click "New Table" under Modeling on Home page, type the following formula, you will get expected result.

Table = FILTER(CROSSJOIN(Table1,Table2),Table1[Tab1-Column2]=Table2[Tab2-Column2])

1.PNG

Best Regards,
Angelia

View solution in original post

3 REPLIES 3
vanessafvg
Community Champion
Community Champion

@mshashmi  

 

can you be more specific about what you are trying to do?  examples of data, screenshots etc.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg

 

I have to make a table visual. I have around 10 tables. I have joined all tables without any issue. Now for my report, I need to use a condition in which I need to display those rows whose value in one table eqauls that in another table

 

Table1

 

Column1     Column2

ABC                1

QWE               2

XVC                 3

KFH                 6

 

Table2

 

Column1     Column2

123                   2

646                   6

987                   1

 

Now I want complete data of all columns of table1 where table1.column2=table2.column2

ie first, second and fourth row should be displayed as only that value is present in table2.column2

Hi @mshashmi,

You can use CROSSJOIN function as follows.


First, change your column header name, which make them different in different tables. Because, crossjoin function is unsupported for same column names.

2.PNG

Then, click "New Table" under Modeling on Home page, type the following formula, you will get expected result.

Table = FILTER(CROSSJOIN(Table1,Table2),Table1[Tab1-Column2]=Table2[Tab2-Column2])

1.PNG

Best Regards,
Angelia

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors