date interval
3 Topicsdate intelligenceate
Hello guys, i'm doing some manipulations with dates CAn u help with it because i cant find a solution i need. On my page i will have to filter tables : year and month number I want to count how many rows i have that satisfy my condition. Condition is about : if i choose a date ( year and month), how many rows i have for which my date is in interval of date of entry and date of depart. ( two columns of dates that are in my principal data table). IT'is like to be able to choose a date (year and month) and then compare it to my date of entry and date of depart. If a choosen date is otsuide or inside the interval. I decided to start with a simple : i want to calculate how many rows i have for which YEAR of my date of entry is less then the YEAR selected in a filter. Thanks for any help Hope it was clear. I send you some screens to let it be more precise.Solved844Views0likes1CommentCumulative count between 2 dates column.
Hi All, I have a property data with columns start date and end date. I want to find the cumulative count of the property live based on the start date and end date based on the property status. Sample data: Property ID Property name start date end date status 10001 xyz Motor Inn 20/03/2020 Live 10000 ABCy Villa 21/03/2020 20/04/2019 Terminated 10003 81 Hotel 24/03/2020 Live 10004 113 motel inn 24/03/2020 Live 100 ABC Lodge 20/04/2020 Live 10005 The Rope club 25/04/2020 Live 10006 Tiny Island 26/04/2020 Live 10007 Number41 serviced Apartments 27/04/2020 Live 10008 402 Morocco inn 28/04/2020 Live 1. When the end date is empty, the property is still live and can be counted. 2. If the property is terminated, then the count will be applied only till the end date. Expected output: Property ID Property name start date end date status Live_count 10001 xyz Motor Inn 20/03/2020 Live 1 10000 ABCy Villa 21/03/2020 20/04/2019 Terminated 2 10003 81 Hotel 24/03/2020 Live 4 10004 113 motel inn 24/03/2020 Live 4 100 ABC Lodge 20/04/2020 Live 5 10005 The Rope club 25/04/2020 Live 5 10006 Tiny Island 26/04/2020 Live 6 10007 Number41 serviced Apartments 27/04/2020 Live 7 10008 402 Morocco inn 28/04/2020 Live 8 I am not sure how to achieve this in Power BI. Thanks, Kanthi.979Views0likes2CommentsLookupvalue on date period
Hi, I have been searching for ways to lookup a value (for instance a costprice) from another table based on a time interval. Sales Table PriceTable Date Product Product StartDate EndDate Cost 2019-01-01 A A 2019-01-01 2019-01-31 5 2019-01-01 B B 2019-01-01 2019-01-31 8 2019-01-02 A A 2019-02-01 2019-02-28 7 2019-02-01 A Desired outcome SalesTable Date Product Price 2019-01-01 A 5 2019-01-01 B 8 2019-01-02 A 5 2019-02-01 A 7 I have no problems getting the price for the first of every month as those dates correspond with each other. But what I would like is for the sale on the second to lookup the corresponding cost price based on the price in the interval 2019-01-01 - 2019-01-31. How does one best set this up? Some use of minx/maxx? TopN? I managed to solve it by creating a helper table listing all dates between the intervall and adding the cost price on each date for each item. But this table grows quickly, and the sollution is not very neat. I am sure there are better and faster ways to do this. I don't mind if the sollution is given as a calculated column or a measure. Any way that is better than the list of all possible dates/items/costs would work. Thank you, Kind regards, PatrikSolved3KViews0likes2Comments