date range
4 TopicsComparing values with the same date range
Hi Community I would like to get some help with a DAX measure. I want to have a bar chart like shown in the snippet, where i compare values from previous years, but my struggle is to have the same date range as my current year (in this case 2024/25) so in a month slicer i have selected september. this means that i have data from september 1st til september 17th. But my previous years shows the full month of september. How can i make sure it always follows the same range? how would a DAX measure look like to achieve this?Solved1.3KViews2likes3CommentsFind duplicates between "date selected" and "date selected" - 30 days
Hi! 🙂 I have date filters (slicer) for year, month and day in a model that uses a table with [ID] and [Date] I want to show the duplicates between the "Date selected" and ("Date selected" -30 days) This is the table: If i select "December 1st, 2022" it should only show these: Thank you!1.1KViews0likes3CommentsCreate a Dynamic Flag based off a Date Range Slicer
Hello; I have a data set of projects that have both a start and a finish date, for example: Project Number Project Name Start Date Finish Date 1 Abc 1/15/2020 4/21/2020 2 Def 3/18/2020 8/10/2020 3 Ghi 4/12/2020 9/5/2020 4 JKL 9/19/2020 3/1/2021 My users want a dashboard that has a date slicer providing a range, so for instance 5/1/2020 - 8/30/2020, and then only display the projects that are active betwen that range. I was thinking I could provide a flag, so in the case of the above data it would look like this given the above dates: Project Number Project Name Start Date Finish Date Flag 1 Abc 1/15/2020 4/21/2020 0 2 Def 3/18/2020 8/10/2020 1 3 Ghi 4/12/2020 9/5/2020 1 4 JKL 9/19/2020 3/1/2021 0 Based on what I have seen from other posts, I think something like this can be done via DAX, but I don't have enough experience with the language yet to be able to program it. For Refence my Table is named "Projects" and the slicer is "Active Date Range". Any help you guys can give would be appreciated. Thanks Gerry2KViews0likes3CommentsLookupvalue 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