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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
GoingIncognito
Advocate III
Advocate III

Filter one table to only include values that have equaling values in two columns

My question is fairly simple:

On a report page all I need to display is a table. And this table receives all the rows from database table as is. Only one filter needs to be used: Table[Date1] = Table[Date2]. I'm comparing two different date values from the same table. All these rows gets to go into the report page. Sounds really simple, but what is the best way accomplish this? 

Can I somehow make a filter or slicer that does this for me? Should I use calculatetable(filter())? Should I just use calculate(filter()) separately on all rows? What would be the best practice?

Thank all of you once again!

1 ACCEPTED SOLUTION

Hi @GoingIncognito 

 

You can use the below as a measure 

Measure = SUMX( 'Table', INT( 'Table'[x] = 'Table'[y] ) )

 And use the Measure to filter Visual table like.

 

image.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

5 REPLIES 5
Mariusz
Community Champion
Community Champion

Hi @GoingIncognito 

 

you can simply add a column in your 'Table' with syntax simple as.

Column = Table[Date1] = Table[Date2]

This will return true if the same and false if not, later you can use filter pane to filter page or visual to True

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Yeah, I though about this too. I don't especially like adding more columns to any table - but in this scenario it really seems like the best solution? Thank you for you advice!

Hi @GoingIncognito 

 

You can use the below as a measure 

Measure = SUMX( 'Table', INT( 'Table'[x] = 'Table'[y] ) )

 And use the Measure to filter Visual table like.

 

image.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Yass, thank you! Your solution is of the outmost absolute brilliance, thank you!

GoingIncognito
Advocate III
Advocate III

Oh, yeah I forgot to mention: Table1[Date2] has the same date repeated on all rows. So I can't just filter out the rows that has blanks. I need to compare the two dates.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors