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

why is Date2-Date1 and sum(Date2-Date1) different

Hello,

I have a chart where I have three dimensions

Resource     Start Date      End Date

No row is repeating for these three dimensions. Then i am just checking a few expressions and i have noticed something strange. When i take the expression (End Date - Start Date), it is giving the correct date different. However, when i take sum(End Date - Start Date), The value becomes really huge

I think that if no row is repeating for these three dimensions, then the sum should not make any difference over (End Date - Start Date)

I have created a sample data with five rows, and on that sample data, the sum is not making any difference, which makes sense. However, on real date, the sum is changing the results.

the below image shows when i am simple taking the data difference (End - Start)

Difference.PNG

The below image shows when i am taking sum over difference .i.e sum(end - start)

sum over difference.PNG

Can someone see what might be wrong with my data or expression?

Arif

10 Replies
swuehl
MVP
MVP

Since your dimensions are [Contract End] resp. [Contract Start] (thus you get really only the duplicate records), a

=sum(distinct [Contract End]-[Contract Start])

should do.

Hope this helps,

Stefan