cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## Problema con el filtrado de datos

Buenos días,

Tengo el siguiente problema:

Jose Perez           Ana Fernandez           PC-1

Alba Cuesta        Jose Perez                   PC-2

Alba Cuesta                 PC-3

PC-4

Roberto Larcos                                       PC-5

Javier Piri           Ana Fernandez             PC-6

Alba Cuesta       Judit Becker                  PC7

Judit Becker                                            PC8

El problema llega cuando realizo el filtrado. Resulta que, al seleccionar los operadores que pertenece a la columna "Operador1" filtra bien los ordenadores y muestra los que puede usar. Pero, al seleccionar un operador que pertenece a la columna "Operador2", no filtra bien y aparece que tiene 0 ordenadores.

Saludos

1 ACCEPTED SOLUTION
Community Support

Thanks for your sample data first.

According to your description, you want to filter the operator both in the two columns.

Here are the steps you can refer to :
(1)This is my test data:

(2)We need to click "New Table" to create a dimension table as the slicer visual field:

``Table 2 = DISTINCT( FILTER( UNION( SELECTCOLUMNS('Table',"Operator" , [Operador1]) , SELECTCOLUMNS('Table',"Operator" , [Operador2])) , [Operator]<> BLANK()))``

(3)Then we can create a measure like this:

``````Measure = var _operator1= MAX('Table'[Operador1])
var _slicer = VALUES('Table 2'[Operator])
return
IF(OR( _operator1 in _slicer , _operator2 in _slicer) ,1,0)``````

(4)Then we can put the measure on the "Filter on this visual" and we can get the result is as follows:

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!

Best Regards,

Aniya Zhang

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

Community Support

Thanks for your sample data first.

According to your description, you want to filter the operator both in the two columns.

Here are the steps you can refer to :
(1)This is my test data:

(2)We need to click "New Table" to create a dimension table as the slicer visual field:

``Table 2 = DISTINCT( FILTER( UNION( SELECTCOLUMNS('Table',"Operator" , [Operador1]) , SELECTCOLUMNS('Table',"Operator" , [Operador2])) , [Operator]<> BLANK()))``

(3)Then we can create a measure like this:

``````Measure = var _operator1= MAX('Table'[Operador1])
var _slicer = VALUES('Table 2'[Operator])
return
IF(OR( _operator1 in _slicer , _operator2 in _slicer) ,1,0)``````

(4)Then we can put the measure on the "Filter on this visual" and we can get the result is as follows:

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!

Best Regards,

Aniya Zhang

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

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

#### Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors