Create a filter with condition in selection with an alert

Viewed 30

I have a filter containing the Year and the Month like below :

enter image description here

I want to make a rule to select only one year and two months in that year. Example : I select 2020 and then April and May.

Can I also add a message alert ? when selecting only one year and one month, a message appears "You should select two months"

1 Answers

You could create a measure to check that the correct month filters have been applied, then display that measure in a card:

Check Date Filter = 
    IF ( 
        COUNTROWS ( SUMMARIZE ( 'Calendar', 'Calendar'[Year], 'Calendar'[Month] ) ) <> 2,
        "Please select 2 months",
        ""
    )

enter image description here

enter image description here

Related