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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.