Forum Discussion
DATESBETWEEN function ignoring LASTDATE Measure
| Month | Product | TotalWeight[kg] |
01/06/2023 | Product A | 120 |
| 05/02/2022 | Product A | 100 |
| 06/02/2023 | Product A | 50 |
| 01/01/2023 | Product A | 60 |
| 03/04/2022 | Product A | 100 |
| 03/04/2022 | Product B | 120 |
I then want a slider to select a date range from, say, 03/04/2022 to 06/02/2023 and this would then return weights by product for the given date range only. So the resulting "answer" would look like this:
| Product | TotalWeight[kg] |
| Product A | 210 |
| Product B | 120 |
My intention was to use the measures MaxDateFG (ie 06/02/2023) and MinDateFG (ie 03/04/2022) to establish the filter dates from the slider. But my measures seem to be ignoring the slider filters. Hope i am making sense.
hi, AlunThomas
your code is right but when you select date range from slicer then slicer include all date bw your first and last date .
means
from your above data if you select date range bw (03/04/2022 to 06/02/2023) slicer include all date from
(03/04/2022 to 06/02/2023 ) which is 91 dates not 4 date .
so when you move range your range not exced actual date(present in table ) so data not change and you feel that above code is not working
i hope you clear about that