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
franorio
Helper III
Helper III

Question on If statement, should add when is not blank

Hi guys, 

Got a basic question, first Calculated Column "Celular vs Ingreso" checks the difference between 2 dates :

 

-Celular vs Ingreso = IF('KPI'[Fecha solicitud de ingreso]<'KPI'[Celular & Linea Resolucion],DATEDIFF('KPI'[Fecha solicitud de ingreso],'KPI'[Celular & Linea Resolucion],DAY),(-1)*DATEDIFF('KPI'[Celular & Linea Resolucion],'KPI'[Fecha solicitud de ingreso],DAY))

 

Second Column "-Celular" should return a status: if first "Celular vs Ingreso" column is greater than 0 days, should be "NO OK", if the column is less than 0 should be OK.

 

-Celular = IF('KPI'[-Celular vs Ingreso]>0,"NO OK", "OK")

 

The problem is there are some date columns that have no dates, so the value is null, so column has blank values, this is not a problem for column "Celular vs Ingreso", it returns no values for those null dates. But when advancing with the second calculated column "-Celular" the if statement is bringing me a OK as if there would be a zero value on it, and should stay blank

 

is not blank.PNG

 

Already tryied with = IF(NOT(ISBLANK([-Celular vs Ingreso]>0,"NO OK", "OK"))) but i'm getting an error.

 

Any ideas on how to get this done?

 

Thanks & Regards!

 

 

 

1 ACCEPTED SOLUTION

Thanks for the reply. Still getting blanks, found a way arround thanks to Vvelvarde.

 

-Celular = IF('KPI'[-Celular vs Ingreso]<>BLANK(),IF('KPI'[-Celular vs Ingreso]>0,"NO OK", "OK"))

 

 

Thanks anyway!!!

 

Regards!

View solution in original post

2 REPLIES 2
12scml
Resolver I
Resolver I

Hi @franorio!
I'm also quite new to Power BI but I hope this helps! I think if you use the following DAX code this might work:
IF('Table3'[Column1] > 0, "OK") & IF('Table3'[Column1] < 0, "NO OK").

I tested it with some test values, and it gave me what I think you were trying to get!

Thanks for the reply. Still getting blanks, found a way arround thanks to Vvelvarde.

 

-Celular = IF('KPI'[-Celular vs Ingreso]<>BLANK(),IF('KPI'[-Celular vs Ingreso]>0,"NO OK", "OK"))

 

 

Thanks anyway!!!

 

Regards!

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.