Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Filtering Last Month to date and Last Month

Hello, 

I was trying to create default values for dates. Such that end users can filter the visuals by clicking the default value. I want to create a filter as below:

 

I have tried many ways, Please help me if there is any possible solution for the above scenario
Thanks

2 Replies

  • You would need to create the following measure:

    Measure =

    SWITCH (

        TRUE (),

        [FilterValue] = "Last Month To Date", [Last Month To Date],

        [FilterValue] = "Last Month", [Last Month]

    )

    Where
    FilterValue = SELECTEDVALUE ( 'Table'[Filter] )

  • v-diye-msft's avatar
    v-diye-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

     

    If the filter column is in another table, you can just manage the relationship between it and default value column, not quite sure the data in your sample, you might provide the dummy pbix if you'd like to get further help.