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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Naveen_SV
Helper IV
Helper IV

Cómo mostrar el valor en blanco si no hemos seleccionado ningún filtro

Hola

Estoy buscando el valor de la tarjeta que debe mostrar el valor en blanco cuando no he seleccionado ningún filtro.

si tengo varios valores en la tarjeta cómo mostrar el valor máximo de ese valor

a continuación formuale he probado que está trabajando para el valor de fecha que tiene único.

nuevo Comprobación 1 - var total - CALCULATE(COUNT(Table[Date]), ALL(Table[Date])) RETURN IF(HASONEVALUE(Table[Date]), SELECTEDVALUE(Table[Date]), BLANK())

esta fórmula no está funcionando cuando tenemos varios vaues a continuación es un ejemplo ambos son del mismo país, pero me gustaría mostrar el primer valor de Name.

ex:

Nombre País

Jack Brasil

Mack brasil

otro ex:

Fecha País

22/02/2020 India

24/10/2020 Brasil

ex: datepcd.PNG

1 ACCEPTED SOLUTION

Hola

Por favor, intente esto:

related country =
CALCULATE (
    MAX ( 'Table (2)'[Country] ),
    FILTER ( ALL ( 'Table (2)' ), 'Table (2)'[Date] = MAX ( 'Table (2)'[Date] ) )
)

El resultado muestra:

8.PNG

Vea mi archivo pbix adjunto.

Saludos

Giotto

View solution in original post

6 REPLIES 6
v-gizhi-msft
Community Support
Community Support

Hola

Agrego algunos datos a su muestra original para probar.

Por favor, pruebe esta medida:

new Check 2 = 
IF (
    CALCULATE ( DISTINCTCOUNT ( 'Table (2)'[Date] ), ALLSELECTED ( 'Table (2)' ) )
        = CALCULATE ( DISTINCTCOUNT ( 'Table (2)'[Date] ), ALL ( 'Table (2)' ) ),
    BLANK (),
    MAX ( 'Table (2)'[Date] )
)

Al seleccionar valores múltiples en la segmentación de datos, comparar la medida original y esta nueva medida, se muestra:

3.PNG

Vea mi archivo pbix adjunto.

Saludos

Giotto

Hola @v-gizhi-msft

Gracias por su respuesta si quiero mostrar el país también en una tarjeta relacionada con esa fecha que es el valor máximo del país

cómo podemos mostrarlo.

Hola

Por favor, intente esto:

related country =
CALCULATE (
    MAX ( 'Table (2)'[Country] ),
    FILTER ( ALL ( 'Table (2)' ), 'Table (2)'[Date] = MAX ( 'Table (2)'[Date] ) )
)

El resultado muestra:

8.PNG

Vea mi archivo pbix adjunto.

Saludos

Giotto

Pragati11
Super User
Super User

Hola @Naveen_SV ,

¿Probaste este DAX como publicado en uno de sus otros hilos donde hizo esto como una pregunta adicional:?

nuevo Check 1 - var total - CALCULATE(COUNT(Table[Date]), ALL(Table[Country])) RETURN IF(HASONEVALUE(Table[Date]), SELECTEDVALUE(Table[Date]), IF(COUNT(Table[Date]) > 1 && COUNT(Table[Date]) < total, MAX(Table[Date]), BLANK()))

Sólo una sugerencia, tratar de entender el DAX anterior para que pueda modificarlo por su cuenta.

Si esto ayuda y resuelve el problema, apreciar un Kudos y marcarlo como una solución! 🙂

Gracias

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hola @Pragati11 ,

Gracias por la respuesta que probé su anterior sceniour que ya he actualizado en este mensaje, donde no pude obtener datos correctos cuando no hay datos únicos,

sin embargo, probé con su nuevo, incluso aunque no estaba trabajando algún escenario filtrado.

gracias por su respuesta 🙂

@Naveen_SV debería ser bastante sencillo:

Max Date = IF ( ISFILTERED ( YourTable[YourColumnForSlicer] ), MAX ( YourTable[Date] ) ) 

Me gustaría elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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