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
Anonymous
Not applicable

Glitch in calculations of time difference

Hey All,

I have a table with the following columns

NAME | DATE | DAYS TO REVIEW = DATEDIFF(TODAY(),'TABLE'[Date],DAY)

All seems to work as expected. 

Just one record shows a wrong calculation.

How is this possible? Can someone explain this issue? How can I fix it?

Example from today 24/05/2019. The marked record shold show 9 or 10 while it is showing 18.

Other records show correct numbers.

2019-05-24 09_46_39-Window.png

 

Cheers!
A

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @Anonymous 

This is due to Power BI being a aggregation tool.The column could be summarized by 'Sum' for the same name.

For example:

First way:You may choose 'Don't summarize' for the column (DAYS TO REVIEW).

1.png

Second way,you may create a measure:

Measure = DATEDIFF(TODAY(),MAX('Table'[date]),DAY)

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-cherch-msft
Employee
Employee

Hi @Anonymous 

This is due to Power BI being a aggregation tool.The column could be summarized by 'Sum' for the same name.

For example:

First way:You may choose 'Don't summarize' for the column (DAYS TO REVIEW).

1.png

Second way,you may create a measure:

Measure = DATEDIFF(TODAY(),MAX('Table'[date]),DAY)

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hey @v-cherch-msft 

Thanks for pointing out the issues.

How come it did not affect all records? Just one was off...

Cheers!
A

Hi @Anonymous 

 The same rows as above(same names)  would be effected.

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.