Forum Discussion
Anonymous
7 years agoNot applicable
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. ...
- 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.
Anonymous
7 years agoNot applicable
Hi MitchM,
I am looking to produce a calculated column.
I tried your code but i recivere a "Token Literal Expected" Error
jdbuchanan71
7 years agoSuper User
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.