Forum Discussion
Lookup between two dates
- Anonymous2 years ago
Hi Edds01388 ,
Do you want this:
I will first show you the sample data:Then use DAX to create a new column:
Title Matched = CALCULATE( FIRSTNONBLANK('Period ends'[Title], 1), FILTER( ALL('Period ends'), 'Safety Tracker 2023'[Date] >= 'Period ends'[Pdatefrom] && 'Safety Tracker 2023'[Date] <= 'Period ends'[Pdateto] ) )The final result is shown below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Edds01388 ,
Do you want this:
I will first show you the sample data:
Then use DAX to create a new column:
Title Matched =
CALCULATE(
FIRSTNONBLANK('Period ends'[Title], 1),
FILTER(
ALL('Period ends'),
'Safety Tracker 2023'[Date] >= 'Period ends'[Pdatefrom] && 'Safety Tracker 2023'[Date] <= 'Period ends'[Pdateto]
)
)
The final result is shown below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi I have just found an issue.
For some reason its missing a single date out of each period.
The first image is a list of dates which the formula does not give a value - the second image is the list of dates (from and to) which is used to pull back the period, as you can see the first day after the start date is blank - help apprecaited
For example the Period from 17/09/2023 to 19/08/2023 - any date in that section should show 7-2023/24 - this works for every day BUT 18/09, this for each group