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
amalrio
Helper V
Helper V

devolver 0 cuando el valor está en blanco

Hola gente útil,

Tengo a continuación la medida contando un campo de texto, necesito devolver 0 cuando el valor del campo está en blanco, A continuación es la medida que creé.

=======

Facilidad de TSF en uso ?
Total de VAR: CALCULATE(
COUNT('FACT-Data'[TEXT]),
KEEPFILTERS('FACT-Data'[TEXT] <> BLANK())

)
Resultado del VAR: IF(Total - BLANK(), 0, Total)

devolución
Total
========
itemswithblank.jpg
En la Prueba M, necesito 0 cuando el recuento está en blanco. mi fórmula no funciona de la manera que quiero cuando pongo si las condiciones otros nombres de Matrix a la ciernes en el objeto visual (tabla). Sólo necesito mostrar el 0 para esta selección (como en la tabla)
1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community Champion

@amalrio

Pruebe lo siguiente:

TSF Facility in Use =
VAR Total = CALCULATE(
COUNT('FACT-Data'[TEXT]),
KEEPFILTERS('FACT-Data'[TEXT] <> BLANK())
)
RETURN
IF(ISBLANK(Total), 0, Total)

Otra opción es agregar 0 al final de la fórmula:

TSF Facility in Use = CALCULATE(
COUNT('FACT-Data'[TEXT]),
KEEPFILTERS('FACT-Data'[TEXT] <> BLANK())
) + 0

View solution in original post

4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

+0 Así de simple.... Gracias

amitchandak
Super User
Super User

@amalrio , en la devolución se puede añadir +0

devolución
Total +0

O

devolución

if(isblank(Total),0,Total)

manikumar34
Solution Sage
Solution Sage

@amalrio

Modificar con ISNULL

Facilidad de TSF en uso ?
Total de VAR: CALCULATE(
COUNT('FACT-Data'[TEXT]),
KEEPFILTERS('FACT-Data'[TEXT] <> BLANK())
)
devolución
IF(OR(ISBLANK(Total),ISNULL(Total)), 0, Total)





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




themistoklis
Community Champion
Community Champion

@amalrio

Pruebe lo siguiente:

TSF Facility in Use =
VAR Total = CALCULATE(
COUNT('FACT-Data'[TEXT]),
KEEPFILTERS('FACT-Data'[TEXT] <> BLANK())
)
RETURN
IF(ISBLANK(Total), 0, Total)

Otra opción es agregar 0 al final de la fórmula:

TSF Facility in Use = CALCULATE(
COUNT('FACT-Data'[TEXT]),
KEEPFILTERS('FACT-Data'[TEXT] <> BLANK())
) + 0

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.