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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
LucianoS
Frequent Visitor

Filtrar los resultados de una medida con funcion IF

Estimados, recurro a ustedes por ayuda.

He llegado a resultados a través de una medida. 

Necesito filtrar por un segmentador los resultados de la siguiente medida:

LucianoS_0-1669927228401.png

Estaba intentando a través de Tablas desconectadas pero no tuve éxito.

Ya se que esto puedo lograrlo si fuese una columna dentro de la tabla.

 

Muy agradecido si me pueden ayudar o guiar.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @LucianoS ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1669946726887.png

Table2:

vbinbinyumsft_1-1669946747930.png

2. create measure with below dax formula

Measure = IF(MAX('Table'[Column1])>MAX('Table'[Column2]),"Seguro","Reponer")
Measure2 =
VAR cur_choice =
    SELECTEDVALUE ( Table2[Column1] )
VAR _m = [Measure]
RETURN
    IF ( ISFILTERED ( Table2[Column1] ), IF ( cur_choice = _m, 1 ), 1 )

3. add table visual with Table fields and Measure, add slicer visual with Table2 field, add Measure2 to the table visual filter pane.

vbinbinyumsft_2-1669946937880.png

Animation19.gifPlease refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
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

1 REPLY 1
Anonymous
Not applicable

Hi @LucianoS ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1669946726887.png

Table2:

vbinbinyumsft_1-1669946747930.png

2. create measure with below dax formula

Measure = IF(MAX('Table'[Column1])>MAX('Table'[Column2]),"Seguro","Reponer")
Measure2 =
VAR cur_choice =
    SELECTEDVALUE ( Table2[Column1] )
VAR _m = [Measure]
RETURN
    IF ( ISFILTERED ( Table2[Column1] ), IF ( cur_choice = _m, 1 ), 1 )

3. add table visual with Table fields and Measure, add slicer visual with Table2 field, add Measure2 to the table visual filter pane.

vbinbinyumsft_2-1669946937880.png

Animation19.gifPlease refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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