Forum Discussion
Comparing two dates using one calendar table and USERELATIONSHIP
Rowwise comparison of columns is very expensive at runtime. I suggest you simply add a calculated column called "Late" and add a forumula somthing like this
=if(FactTable[Del Date] > FactTable[Est Del Date],"True")
You can then use this column in your measures.
Late orders = calculate(countrows(FactTable),FactTable[Late] = "True")
Hi Matt,
Thanks for your reply :)
Yes, was thinking about adding a helper column to do this (I'd previously read that calc columns are also quite expensive) so this might be the route to go down.
Is it possible at all to do it via a measure? I'm looking to learn how to compare different date values from different tables as I suspect I'll have to do this alot - without always needing to generate a calculated column. Is it possible to compare two actual dates in the related calendar table, where the dates both reference the same calendar table via two individual relationships??
Thanks!
Pbix