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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
o59393
Post Prodigy
Post Prodigy

Si el valor seleccionado no funciona como se esperaba

Hola a todos

Estoy tratando de crear un dax con el valor seleccionado.

Básicamente, si selecciona en la segmentación de datos un embotellador o una instalación, el dax debe devolver 1, de lo contrario, si no selecciona ambas opciones en la segmentación de datos (déjelas en All), debe devolver un 2.

El dax es:

If selected value = 
if(OR(SELECTEDVALUE(facilities[facility]),SELECTEDVALUE(facilities[bottler])),
        1, 
            2
)

La declaración falsa funciona bien:

asldasdas.JPG

Pero la verdadera declaración no funciona:

tusdsada.JPG

¿Cómo puedo hacerlo correcto?

¡Gracias!

1 REPLY 1
amitchandak
Super User
Super User

@o59393 , No está utilizando el valor seleccionado. Puede intentar que se filtre o hasonevalue

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Kudoed Authors