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
luciano1903
Frequent Visitor

Medida com a função IF retorna informação Divergente

Bom dia Pessoal!

Criei duas medidas no Power BI, com a seguinte finalidade ver quais tarefas eu realizai dentro de 01 hora. Todas as tarefas que fiz até 1 hora ele retorna "Dentro da Meta", o que passar de 1 hora "Fora da Meta", porém tem tarefas que passou do prazo de 1 hora e ele está me retornado como "Dentro da Meta". conforme imagem abaixo:

As Medidas que criei são:

Duração = DATEDIFF('PENDENTES'[NUMERAÇÃO] , PENDENTES[ENVIO], HOUR)

Prazo = IF([Duração] <= 1, "Dentro da meta", "Fora da meta")

Imagem do BI:

 

Segue exemplo de dados:

luciano1903_1-1706277992735.png

 

Como ele aparece no BI:

luciano1903_2-1706277992810.png

 

Desde já agradeço se puderem me ajudar a identificar o problema.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

DATEDIFF(HOUR) literally just subtracts  the hour values, regardless of the actual duration. Use DATEDIFF(MINUTE) and compare to 60

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

DATEDIFF(HOUR) literally just subtracts  the hour values, regardless of the actual duration. Use DATEDIFF(MINUTE) and compare to 60

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.