Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Apply a date filter by default

Hi guys,   When the user will open the report, all visuals should be filtered to display only data of the last year WHICH HAS CONTENTS.  by exemple: we are in 2022, if this year has data, we filte...
  • v-janeyg-msft's avatar
    4 years ago

    Hi, Anonymous 

     

    In the date slider, there is no filtered date and the date slider is an effect on the border, isfiltered function can't distinguish between the two cases.

    In your cases, you can use 'enter data' in desktop to create a table like this, and use it as a slicer.

    Then create a measure to distinguish whether there is a filter date.

    Like this:

    number of car sold =
    IF (
        SELECTEDVALUE ( 'table 2'[Date selected] = "No" ),
        DISTINCTCOUNT ( car[N° car] ),
        TOTALYTD ( DISTINCTCOUNT ( car[N° car] ), Periode[Date] )
    )
    

    Did I answer your question? Please mark my reply as solution. Thank you very much.
    If not, please feel free to ask me.

     

    Best Regards,

    Community Support Team _Janey