cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AClerk Senior Member
Senior Member

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Glitch in calculations of time difference

Hi @AClerk 

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.
3 REPLIES 3
Community Support Team
Community Support Team

Re: Glitch in calculations of time difference

Hi @AClerk 

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.
AClerk Senior Member
Senior Member

Re: Glitch in calculations of time difference

Hey @v-cherch-msft 

Thanks for pointing out the issues.

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

Cheers!
A

Community Support Team
Community Support Team

Re: Glitch in calculations of time difference

Hi @AClerk 

 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.