Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I'm trying to calculate the time between two date columns that are in different tables
This is what i got so far:
For example the time differens in the first record should juist a bit longer than 3 days and not -201,63
I also tried:
_AN_Houdbaarheid = DATEDIFF(RELATED(AQZ_SAMP_VIEW[MO_Bemonsteringsdatum].[Date]);'AQZ_TEST_VIEW'[AN_start_Datum].[Date];DAY)
But the same probleem. Hopefully someone can help my
Solved! Go to Solution.
Hi @icturion ,
By my tests, if you want to calculate the difference between the date from different table, you formula should be right.
I have a little confused about your scenario, for your first record, the difference between 2016-7-28 11:45:00 and 2016-1-8 20:31:00 should be 202 if you calculate for Days.
Why do you think that time differens in the first record should juist a bit longer than 3 days?
Did I misunderstand your data sample?
What is your desired output? And which difference do you want to calculate between the two date column? Day, Month or Minute?
Best Regards,
Cherry
Hey,
I guess the date is not recognized properly, just check using the month function, if you receive July or August and not error and January.
Do not use .Day, just the column reference.
Regards,
Tom
Hi Tom,
If i use:
Month check = AQZ_TEST_VIEW[AN_Start_Datum].[Month]
and
Month check = AQZ_SAMP_VIEW[MO_bemonsteringdatum].[Month]
I get the correct month on bove columns.
but still the time differents is incorrect
Hi @icturion ,
By my tests, if you want to calculate the difference between the date from different table, you formula should be right.
I have a little confused about your scenario, for your first record, the difference between 2016-7-28 11:45:00 and 2016-1-8 20:31:00 should be 202 if you calculate for Days.
Why do you think that time differens in the first record should juist a bit longer than 3 days?
Did I misunderstand your data sample?
What is your desired output? And which difference do you want to calculate between the two date column? Day, Month or Minute?
Best Regards,
Cherry
Hi Tom,
If I use month with datediff the i get an error.
both columns are type: date and time
Regards
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |