Forum Discussion
mshamsiev1234
1 year agoRegular Visitor
Month Filter Displayed As Text
Hey community! I am looking to create a text box or card based visual that displays all selected filters for our end users. I have managed to do so with the standard filters (though it only seems...
- 1 year ago
why not get the min and max months selected instead?
MinMaxMonths = VAR MinMonth = FORMAT(MIN('Calendar'[Month]), "mmm-yy") VAR MaxMonth = FORMAT(MAX('Calendar'[Month]), "mmm-yy") RETURN MinMonth & ">" & MaxMonth
rajendraongole1
1 year agoSuper User
Hi mshamsiev1234 - Use the MIN and MAX functions to identify the range of selected dates in the slicer and format them appropriately.
SelectedDateRange =
VAR MinDate = MIN('Calendar'[Date])
VAR MaxDate = MAX('Calendar'[Date])
RETURN
IF (
ISBLANK(MinDate) || ISBLANK(MaxDate),
"No Dates Selected",
FORMAT(MinDate, "MMM-yy") & " > " & FORMAT(MaxDate, "MMM-yy")
)
It works, please check and confirm