Forum Discussion
Returning values on slicer bounds
- 3 years ago
hi AviramWeiss
Aha, the Date column of the slicer shall come from an independent Date Table with this code:
DateTable = CALENDAR(MIN(TableName[Date]), MAX(TableName[Date]))And change the code for the measures to:StartValue =VAR MinDate = MIN (DateTable[Date])RETURNCALCULATE(SUM(TableName[Value]),TableName[Date] = MinDate)EndValue =VAR MaxDate = MAX (DateTable[Date])RETURNCALCULATE(SUM(TableName[Value]),TableName[Date] = MaxDate)Total =VAR MinDate = MIN (DateTable[Date])VAR MaxDate = MAX (DateTable[Date])RETURNCALCULATE(SUM(TableName[Value]),TableName[Date] >= MinDate&&TableName[Date] <= MaxDate)i tried and it now worked like this:
Thank you, FreemanZ, for the quick and thorough response.
I have tried your solution, but like all previous ones, it takes a "personal" max for every category.
Thus, If I pick a min/max date that has no instance, the measure takes the first/last date within the selected range, and not the exact first/last date.
Here's the data I entered again (all dates are dd/mm/yyyy format):
When I pick Nov 2-7, I want to get for AAA startValue=30 and endValue=0, becuase it has no records at Nov 7. These are the results I got:
Thank you very much again.
hi AviramWeiss
Aha, the Date column of the slicer shall come from an independent Date Table with this code:
- AviramWeiss3 years ago
Helper I
Works perfectly now. Thank you very much.