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
smpa01
Super User
Super User

DAX para devolver valores separados para 0 y BLANK

Helllo chicos,

¿Hay alguna manera para mí de decirle a DAX que distinga entre BLANK y 0. Si ejecuto BLANK() DAX convierte todas las celdas con blank a 0 y BLANK() devuelve true para 0 y blank.

E.g.

Mis datos sin procesar están siguiendo

Gato Valor
A1
A2 0
A3 0
A4 100
A5 100
A6 1
A7

Actualmente regresa

Gato Valor Resultado actual
A1 Blanco
A2 0 Blanco
A3 0 Blanco
A4 100 no en blanco
A5 100 no en blanco
A6 1 no en blanco
A7 Blanco

¿Hay alguna manera para mí para decirle a DAX que devuelva lo siguiente como mi resultado deseado

Gato Valor Resultado deseado
A1 Blanco
A2 0 no en blanco
A3 0 no en blanco
A4 100 no en blanco
A5 100 no en blanco
A6 1 no en blanco
A7 Blanco

Lo intenté con ambos

Blanco

Y

Coalesce

pero no pude hacer DAX para devolver lo que quería.

Se adjunta la muestra PBIX. si alguien puede por favor ayudar sería genial.

Gracias de antemano.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
4 REPLIES 4
amitchandak
Super User
Super User

@smpa01 , pruebe nueva columna

if(isblank([Value]) ,"blank","non-blank")

@amitchandak gracias funcionó

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
harshnathani
Community Champion
Community Champion

HI @smpa01 ,

Por favor, compruebe si el siguiente video puede ser de ayuda.

https://www.youtube.com/watch?v=C26DQkb4hyY

saludos

Harsh Nathani

¿Respondí a tu pregunta? ¡Marca mi puesto como solución! Apreciar con un Kudos!!

@harshnathani a mi amigo, funcionó. Hizo el truco.

Capture.PNG

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

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.