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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
NOVICE02
Helper III
Helper III

Devolver Y/N basado en el valor

hola a todos,

Por alguna razón, no puedo hacer esto.... Tengo una columna con espacios en blanco e Y. Sólo quiero escribir una medida donde si el valor está en blanco entonces obtengo 'N' else Y

cuando escribo lo siguiente: IF(ISblank(Query1[STL_last12]),"n","y") sólo obtengo "Y" como la opción.

¿Algún consejo?

4 REPLIES 4
MarcoPessina
Resolver IV
Resolver IV

HI @NOVICE02 ,

¿Has probado:

IF(Query1[STL_last12]"","n","y") ?

Espero que ayude.

Salud.

Marco

Marco,

¡Muchas gracias! Funcionó. ¿Por qué el ? ¿podría explicar amablemente?

Hola @NOVICE02 ,

la razón está relacionada con:

  • "" - BLANK() ->TRUE
  • ISBLANK("") -> FALSO

a pesar de lo anterior: ISBLANK(BLANK()) -> TRUE

Puedes encontrar información interesante aquí:

https://www.sqlbi.com/articles/blank-handling-in-dax/

https://xxlbi.com/blog/different-blanks-in-dax/

Espero que ayude.

Cheeers,

Marco

Sí, mucho. gracias amablemente

Helpful resources

Announcements
March Fabric Community Update

Fabric Community Update - March 2024

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

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors