Forum Discussion
dkernen
5 years agoResolver II
Date Comparison between two Related Tables
I have searched this forum, but I believe I have a very basic request. I have shimmied down my data model. I have a fact table (factCase) with a date (TIncision_DT) and a dimension table (dimQu...
- Anonymous5 years ago
Hi dkernen ,
You could use DATEDIFF() function.
https://docs.microsoft.com/en-us/dax/datediff-function-dax
Example:
Measure = DATEDIFF(SELECTEDVALUE(factCase[TIncision_DT]),SELECTEDVALUE(dimQuality[QTProcessorReview_DT]),DAY)Best Regards,
Jay
vanessafvg
5 years agoCommunity Champion
the one has datetime values the other only had the date no time in it is that correct?
dkernen
5 years agoResolver II
That is correct. But I do have another date/time field in the Quality dim table. The QTQualityReview_DT is a true Date time. I would like to compare the fact table's TIncision to both the ProcessorReview_DT (which is, as you stated, just a date) and also to the QualityReview_DT (which is a true datetime). Thanks for eagle eyes!