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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
3XotiC
Frequent Visitor

Encontrar dos valores de una tabla en otra tabla power BI

Buen día

 

Tengo un problema que no e pude solucionar, el caso es que tengo un grupo de preguntas que se hicieron y dentro de esta tabla que tiene las preguntas necesito encontrar ciertas combinaciones de respuestas que se deben cumplir todo esto en power BI

 

En esta primera imagen se ve por ejemplo debo encontrar en la tabla de respuestas la combinación walmart y automercado en total 15 y estas respuestas deben estar en la pregunta c4 y c1.5 respectivamente para costa rica

3XotiC_0-1717806299109.png

en esta segunda imaguen (Tabla de respuestas) se ve que por ejemplo el ID 203522243 ha tenido varias respuestas en las preguntas c1.5, c4, c1, etc y sus respuestas, 

3XotiC_2-1717806554930.png

 

la pregunta exacta es como hago para contar los id o "SbjNum" de la tabla de la segunda imagen que cumplan con las combinaciones que piden en la tabla de la primera imagen, es decir los "SbjNum" que hayan respondido las dos preguntas que piden en la primera tabla y que estas se hayan respondido en las preguntas que pide la primera tabla, intente esta formula pero no funciona correctamente (las columnas conbinadas son concatenaciones de las respuestas y las preguntas)

3XotiC_0-1717807861135.png

 

 

Les agradesco muchos su ayuda

5 REPLIES 5
Anonymous
Not applicable

Hi @3XotiC ,

 

1. Create a calculation table to get the data that meets the requirements.

Table =
FILTER(ALL('Export'),('Export'[Pregunta] = "C4" && 'Export'[Respuesta] = "WALMART") || ('Export'[Pregunta] = "C1.5" && 'Export'[Respuesta] = "AUTOMERCADO"))

vkaiyuemsft_0-1718354240515.png

 

2. create measure and count it.

Measure =
DISTINCTCOUNT('Table'[SbjNum])

 

Measure 2 =
CALCULATE(DISTINCTCOUNT('Table'[SbjNum]),'Table'[MODALIDAD ENCUESTA] <> "ONLINE",'Table'[Filter] = -1)

 

vkaiyuemsft_1-1718354270955.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

Hello, thank you very much for the response.

This would help me only in the first combination of the "quotas" table where the response from Walmart and automercado is required, but in this table there are a total of 153 combinations that must be found in the "export" table.

How would the rest of the combinations be found?

Anonymous
Not applicable

Hi @3XotiC ,

 

I don't know what other filtering conditions you need. You can use the && symbol to write other conditions in the filter function.

 

You can also describe your needs in more detail with screenshots or virtual tables so that we can better help you solve the problem.

 

Best Regards,

Clara Gong

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

Anonymous
Not applicable

Hi @3XotiC ,

 

Sorry, I don't understand your question.

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. 

 

Also, please try to ask in English. We can better understand the problem and help you.

 

Best Regards,

Clara Gong

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

 Buen dia

adjunto power bi de datos de muestra 

The ideal is to find which "SbjNum" from the "Export" table matches the response and question with the combinations required in the "QUOTAS" table.

https://drive.google.com/file/d/1RL-iWsD5yiWLTT7dSRP48O9IZn-8Wklk/view?usp=drive_link

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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