1
votes

so I am running a DAX query where I compare 2 date columns (both have full date, no time included) and need to figure out, whether one is still valid (within range), if I add 56 days to the other - using the DATEADD function for this.

It worked before, when I had the date hierarchy in the model, seems like Power BI only accepts .[Date] notation, meaning that

  • DATEADD(InvoiceDueDate; 56; DAY) won't work, but
  • DATEADD(InvoiceDueDate.[Date]; 56; DAY) will work.

Still, I needed to manage relationship model in the data model and I ended up with date hierarchy lost for this column and to use it with .[Date] won't work now. What are my options now, is there a way to return back the date hierarchy for a column? I tried googling this but came empty handed, there are results, but not entirely valid for my problem. Also DATEADD should obviously work with date column since it is a column of data type Date, but it doesn't. Would be so thankful for any help here. Thanks a lot!

1

1 Answers

0
votes

Not a solution but a workaround:

InvoiceDueDate + 56 

You can simply avoid using DATEADD if you don't need to add intervals other than day.