Forum Discussion
DateSelected +/- 1 day filter
- 7 years ago
Hello sriramn84
You can use a measure as a filter on the AutoPosition table to get what you are looking for.
SelectedDriverLog = VAR StartDate = MIN ( DriverLog[Date] ) -1 VAR EndDate = MAX ( DriverLog[Date] ) +1 VAR Result = CALCULATE( COUNTROWS( AutoPosition ), FILTER ( AutoPosition, AutoPosition[CreatedDate] >= StartDate && AutoPosition[CreatedDate] <= EndDate ) ) RETURN ResultThen you apply this measure as a filter to the visual displaying the AutoPosition data and set it to 'Is Not Blank'
If a user selects more than 1 row in your DiverLog visual it will use the date range to pick which rows to display in the AutoPosition visual.
Hello sriramn84
You can use a measure as a filter on the AutoPosition table to get what you are looking for.
SelectedDriverLog =
VAR StartDate = MIN ( DriverLog[Date] ) -1
VAR EndDate = MAX ( DriverLog[Date] ) +1
VAR Result =
CALCULATE(
COUNTROWS( AutoPosition ),
FILTER (
AutoPosition,
AutoPosition[CreatedDate] >= StartDate &&
AutoPosition[CreatedDate] <= EndDate
)
)
RETURN ResultThen you apply this measure as a filter to the visual displaying the AutoPosition data and set it to 'Is Not Blank'
If a user selects more than 1 row in your DiverLog visual it will use the date range to pick which rows to display in the AutoPosition visual.
- Iamnvt7 years ago
Continued Contributor
hi,
you can write this measure:
Measure = VAR selecteddate = SELECTEDVALUE(DimDate[Date]) RETURN COUNTROWS(FILTER(CROSSJOIN(ALL(DimDate[Date]), ALL(Location[Location])), DimDate[Date] >= selecteddate -1 && DimDate[Date] <= selecteddate +1 && FIRSTNONBLANK(AutoPosition[CreatedDate],0) <> BLANK()))
then put it in Autoposition table, or put it in the Filter Panel.
Here is the PBI file: