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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Sadou
New Member

Printing -1 in a DAX formula

Hello dears community,

Kindly, i need help. I have an issu with my DAX formula , i want print the case that the result is false.  Here is the formula : 

Delais livraison new = IF(DATEDIFF(DATA[datePriseCommande], TODAY(),DAY)<1000, DATEDIFF(DATA[datePriseCommande],TODAY(),DAY),-1)

power bi is not printing the number -1 that will be the case where the condition is false.  look forward for help
thanks in advance. 

 

Happy new year !

4 REPLIES 4
Sadou
New Member

Hi @tamerj1 
Thanks for responding me .
I am creating the new calculated colum in the DATA table but the -1 is not coming out . The result if true is OK but the result is false is not coming out.

Sadou_0-1672418588758.png

while in excel the -1 is there ....


 

 

 

 




Anonymous
Not applicable

Hi @Sadou ,

First, please make sure if the field DATA[datePriseCommande]  have any dates for 1000 days ago exactly. And did you apply any filter on the table before you checked the value? 

Best Regards

tamerj1
Community Champion
Community Champion

@Sadou |
Can you filter one of the cases were the difference is more than 1000 but you still don't get the -1? That would be a difference of around 3 years.

tamerj1
Community Champion
Community Champion

Hi @Sadou 

It should work if you are creating the new calculated column in the DATA table.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.