Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am really struggling with such a simple measure that I feel should not be this hard. All I am trying to do is show the most recent date that is less than or equal to the selected date. So for example my slicer has you choose the EndofMonth that you want to see. I would then expect the measure to reflect the below results give the below data.
EndofMonth = 11/30/2023
Data:
Student 1 | 11/21/2023 |
Student 1 | 10/1/2023 |
Student 1 | 4/1/2023 |
Student 2 | 10/1/2023 |
Student 2 | 11/15/2023 |
Student 2 | 12/5/2023 |
Student 3 | 8/10/2023 |
Student 3 | 5/1/2023 |
Student 4 | 9/1/2023 |
Student 4 | 8/18/2023 |
Student 4 | 7/1/2023 |
Student 4 | 10/15/2023 |
Result:
Student 1 | 11/21/2023 |
Student 2 | 11/15/2023 |
Student 3 | 8/10/2023 |
Student 4 | 10/15/2023 |
Any help on this will be greatly appreciated.
Solved! Go to Solution.
I was actually able to solve this myself. The reason it was limiting the dates to that particular month was due to me using the same date column for the filtering. I created a new table such as Calendar = Calendar(Min('Student Data - SQL'[EndofMonth]), Max('Student Data - SQL'[EndofMonth])). I then changed the formula to point toward 'Calendar'[Date] and it worked perfectly.
Latest Date = CALCULATE(MAX('Table'[Column2]), 'Table'[Column2] <= DATE(2023, 11, 30))
just replace the hard-coded date with your slicer value
Unfortunately this isn't working. This is my current measure:
Student 1 | 11/21/2023 |
Student 2 | 11/15/2023 |
I was actually able to solve this myself. The reason it was limiting the dates to that particular month was due to me using the same date column for the filtering. I created a new table such as Calendar = Calendar(Min('Student Data - SQL'[EndofMonth]), Max('Student Data - SQL'[EndofMonth])). I then changed the formula to point toward 'Calendar'[Date] and it worked perfectly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
72 | |
68 | |
41 | |
35 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
42 |