Examples in this article can be used with the sample Adventure Works DW 2020 Power BI Desktop model. How do i give make the starting and ending dates in the DatesBetween function dynamic? I have 3 tables in my dashboard. The nature of simulating nature: A Q&A with IBM Quantum researcher Dr. Jamie We've added a "Necessary cookies only" option to the cookie consent popup. Why are physically impossible and logically impossible concepts considered separate in terms of probability? ERROR: CREATE MATERIALIZED VIEW WITH DATA cannot be executed from a function, Doubling the cube, field extensions and minimal polynoms. I have a table that pulls date, time and value. So go to Edit Query > Add Column > Custom Column and enter the following expression: = if AWBPS [START_DTTM] >= DateTime.Date (DateTime.LocalNow ()) and AWBPS [END_DTTM] <= DateTime.Date (DateTime.LocalNow ()) then 1 else 0 Share Improve this answer Follow answered Aug 29, 2019 at 11:32 Strawberryshrub 3,141 2 10 20 Add a Between Two Dates Split Update Column between 2 dates. With this function, you do not need to worry about the interval or number of intervals. He has a BSc in Computer engineering; he has more than 20 years experience in data analysis, BI, databases, programming, and development mostly on Microsoft technologies. Power BI You can download the pbix file from this link: SD[Machine]="Machine 2"&& SELECTEDVALUE('Date'[Date])