Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi guys,
in my report I want to add, for each row, some days to "today".
The days to add and the date today are in two calculated column named, respectively, "Copertura Giorni" and "Oggi", and both are in the same table "Tabella".
I've used this formula
Data Stock Out = DATEADD(Tabella[Oggi].[Date];'Tabella'[Copertura Giorni];DAY)
to add the days in "Copertura Giorni" to today.
The problem is that the formula works only when the results is within the year.
Do you know where is the error or a way to solve?
Thank you.
Solved! Go to Solution.
Column = [Oggi] + [Copertura Giorni] * 1.
Make sure Column is formatted as a Date or Date/Time.
Date columns are really just numbers. They are the number of days since December 30th, 1899. The whole number portion is the number of days and the decimal portion is the time component.
If you want the number of days from some date to another date you can just subtract the two and make sure that the column is formatted to whole number.
Hi Greg,
thank you for reply.
I want the "Data Stock Out "date, for example:
input:
"Oggi" = 06/08/2018
"Copertura Giorni" = 10
output (with the formula):
"Data Stock Out" = 16/08/2018
Have you tried DATEADD it seems ideal to the case you have described. If it is not working somehow please share the pbix file there might be other issues due to which it might not be functioning as intended
I did confirm that DATEADD when using DAYS and adding a number of days that goes past the end of the year that the function returns blank. Seems like a bug to me.
I think it too.
Do you think that someone should report the bug?
You could check the Issues forum here:
https://community.powerbi.com/t5/Issues/idb-p/Issues
And if it is not there, then you could post it.
Following @Greg_Deckler advixe i have posted the issue. Please read the blog to get better undestanding of the actual problem here which is also highlighted in the question.
Column = [Oggi] + [Copertura Giorni] * 1.
Make sure Column is formatted as a Date or Date/Time.
Date columns are really just numbers. They are the number of days since December 30th, 1899. The whole number portion is the number of days and the decimal portion is the time component.
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |