cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
dmessias
Frequent Visitor

Filter table by string from another table

Hello, my friends.

Tenho a seguinte situação.
Na tabela 1 tenho uma coluna com números de contrato (1000, 1001, 1002, 1003, n)
Na tabela 2 tenho uma tabela de fornecedores que podem atender vários contratos. Nesta tabela há uma coluna com os números de contratos atendidos, porém os números estão inseridos da seguinte forma em cada célula: 1000; 1003 (separados por ponto e vírgula).

Preciso inserir uma segmentação de dados pelo número do contrato (da tabela 1), e que esta consiga filtrar a tabela 2 que contém os dados aglutinados com ponto e vírgula (algo como uma CONTAINSTRING)

 

Alguém consegue me auxiliar nesta missão?

dmessias_0-1684255012706.png

 

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

Hi @dmessias ,

 

For the single selection in the slicer, you can create a measure.

Measure = IF(ISFILTERED('TABELA 2'[Contratos]),IF(CONTAINSSTRING(MAX('TABELA 2'[Contratos]),SELECTEDVALUE('TABELA 1'[Contratos]))=TRUE(),1),1)

Put the measure into the filters of the table visual, set up show items when the value is 1. 

vstephenmsft_0-1684380244245.png

Below is the result.

vstephenmsft_1-1684380284245.png

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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

2 REPLIES 2
dmessias
Frequent Visitor

Great, @v-stephen-msft .

 

I was trying a solution close to the one you suggested, but I was missing some details. Thanks for the tip.

 

Diego

v-stephen-msft
Community Support
Community Support

Hi @dmessias ,

 

For the single selection in the slicer, you can create a measure.

Measure = IF(ISFILTERED('TABELA 2'[Contratos]),IF(CONTAINSSTRING(MAX('TABELA 2'[Contratos]),SELECTEDVALUE('TABELA 1'[Contratos]))=TRUE(),1),1)

Put the measure into the filters of the table visual, set up show items when the value is 1. 

vstephenmsft_0-1684380244245.png

Below is the result.

vstephenmsft_1-1684380284245.png

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors