Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I am Trying to use Datediff to find out the number of days between two dates and I am getting this error
Days Between = DateDiff(table1[Date1], table1[Date2], Day)
A single value for column 'WoW' in table 'Table Current' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
Solved! Go to Solution.
Hi @Anonymous ,
Do Date1 and Date2 belong to the same table?
If yes, you can Subtract Days in Power Query Editor.
Select the two columns and click Subtract Days.
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi @Anonymous ,
Try to have this same formula for New Column instead of new measure.
If you are using measure, try this:
Days Between = DateDiff(MAX(table1[Date1]), MAX(table1[Date2]), Day)
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
@Anonymous ,
What are you trying to calculate the dates against? What is the category here?
Your date fields are returning multiple values and that's the main reason why you are not getting appropriate result.
Can you provide some data and show what is the expected output?
Date1
2017-10-17 |
2017-12-21 |
2017-12-23 |
2018-01-11 |
2018-03-17 |
2018-02-08 |
2018-03-03 |
2018-10-02 |
2018-12-16 |
2019-08-16 |
2019-07-31 |
2019-08-16 |
2019-07-31 |
2019-08-15 |
2019-08-30 |
Date 2
01/16/2018 |
03/15/2018 |
03/16/2018 |
04/18/2018 |
06/18/2018 |
08/14/2018 |
08/14/2018 |
12/17/2018 |
02/15/2019 |
10/16/2019 |
10/16/2019 |
10/17/2019 |
Hi @Anonymous ,
Do Date1 and Date2 belong to the same table?
If yes, you can Subtract Days in Power Query Editor.
Select the two columns and click Subtract Days.
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi @Anonymous ,
Could you share more details? What means 'WoW' column? What do you have in this column?
Can you send a sample of data?
_______________
If I helped, please accept the solution and give kudos! 😀
I am trying to calculate days between two dates using
Days Between = DateDiff(table1[Date1],table1[Date2], Day)
Are you trying to use this as a measure? If yes, try adding this as a column or a calculated column. It should help with this error. It did the trick for me not too long ago.
Well, I tried adding a column, used the same formula and still I am getting the same error.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
90 | |
84 | |
70 | |
49 |
User | Count |
---|---|
141 | |
120 | |
112 | |
60 | |
59 |