Forum Discussion
DATEADD not working
- 9 years ago
As you said, you fact table has many to one relationship to your date dimension table. Since you have multiple entries for same date in fact table, you need to use ALLEXCEPT() function to group the calculation.
And make sure you include the date field from date dimension into visual.
Regards,
Hi sa1
In order for the DateAdd to work you need to have a Date table.
You can create one using my blog post here: https://www.fourmoo.com/2016/09/13/power-bi-how-to-easily-create-dynamic-date-tabledimension-with-fiscal-attributes-using-power-query/
Then you can relate your table to this Date Table.
Once you have done that you can then use the DATEADD function using the above created Date table.
Hi,
I already have a table with only Disntict Date Values
- GilbertQ9 years agoSuper UserHi there are the dates contiguous? In that there is date for every day even if you have no data?
If you do not have the contiguous then it will not recognize it as a Date table and the DateAdd function will not work.