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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Rick_NZ
New Member

datediff question

Hi all,

newbie to PowerBI, I am trying to work out the Best before date vs Today from a table. added a caluated column, by find something strange hope anyone can provide some insights...thanks in advance

 

1. as the difference is future vs today, why showing a negative number?

2. why some of the differences are not correctly calculated? as you see from the 2 underlined results. both with the same BBD, but different result?

Rick_NZ_0-1621916782959.png

Rick

3 REPLIES 3
Alexrai
Helper I
Helper I

I tried to post on this last night but it doesn't seem to have worked... It looks like you may have duplicate records in your table because 72 is twice 36. It may be summing the duration of both to give the wrong asnwer. Have you used a unique key column? (Also you can wrap the function in ABS() to get a positve from a negative)

Jihwan_Kim
Super User
Super User

Hi, @Rick_NZ 

- please try to write today() in front of [SLED/BBD] inside the formula.

- please try not to show SUM of days before expiry. When you just drag the column into the visualization, you can select an option not to show SUM.

 

Or, please share your sample pbix file's link here, then I can try to look into it.

 

thanks.

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi Kim,

 

thanks for the reply...yes by putting today () in front of the formula did show a positive number although it is a bit counter intuitive. 

tried the option don't summaries, but didn't work. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.