Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Column to Find days between dates

Hello, I am looking at traffic on a webpage and for a each page, i have a different publish date. I would like to see the number of days since the publish date for each pageview in a new column.    ...
  • jdbuchanan71's avatar
    jdbuchanan71
    7 years ago

    That is the PowerQuery editor which uses an entirely different language, called M.  Your formula will look something like this.

    = if [Date] >= Date.FromText("6/7/2019") and [Date] < Date.FromText("6/21/2019") then Date.FromText("6/7/2019") else Date.FromText("6/21/2019")

    I would load it to PowerBI and do it in DAX rather than adding the column in the query editor.