Forum Discussion
Anonymous
2 years agoNot applicable
Seeing selected date range in a card visual
I want to show a card visual on the home page of the repport that shows the YearMonth range selected in the filter pane. I have a DimDate[MonthYear] filter on all pages and have a current selecti...
Sahir_Maharaj
Super User
2 years agoHello Anonymous,
Can you please try this:
Selected YearMonth Range =
VAR MinYearMonth = CALCULATE(
MIN(Dim_Date[YearMonth]),
ALLSELECTED(Dim_Date)
)
VAR MaxYearMonth = CALCULATE(
MAX(Dim_Date[YearMonth]),
ALLSELECTED(Dim_Date)
)
RETURN
IF(
MinYearMonth <> MaxYearMonth,
FORMAT(MinYearMonth, "MMM/YY") & " - " & FORMAT(MaxYearMonth, "MMM/YY"),
FORMAT(MinYearMonth, "MMM/YY")
)
Hope this helps - If you have any questions, please do not hesitate to reach out to me.