Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Filter with measure as default value

Hello all

 

I have a report with several filters. One of the filters is for a specific date. For example the data-source contains the dates 5.10.2018, 6.10.2018, 7.10.2018, 8.10.2018

The user has to select the latest date, in this case 8.10.2018. Its always yesterday.

I created a measure to get this date.

But i cant find out how i can set this value as a default value for the filter. I tried the «Smart Filter by OKViz» and the original filter by Power BI.

Is this possible, or do anyone has another idea that would get me the expected result?

 

  • Arentir's avatar
    Arentir
    7 years ago

    The date slicer shows the value unselected, but selecting it after selecting the flag slicer doesn't add any filter to your report (it is already filtered!)

    I understand it would look neater if the date was selected, but it is not something you can achieve I am afraid.

     

9 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Correct me if im wrong, but as far as i understand this, it will always be the specified value. In my case, this should just work as a default value, it has to be still possible to select another date.

      Forgot to say this in my post.

       

      EDIT:

      I read your post again and i misunderstood it, but its still impossible this way. I cant change the data-source.

      I made a column over power bi with the "yesterday" value.

      • Arentir's avatar
        Arentir
        Resolver III

        I don't think there is a way to just default, hence why I would use a "Latest Date" Flag, for instance in a slicer. You can click/unclick this slicer to see all dates.

        You don't need to change the datasource, you can create a calculated column

  • v-danhe-msft's avatar
    v-danhe-msft
    Microsoft Employee

    Hi Anonymous,

    Based on my research, the measure could not be used in the slicer, you could refer to Arentir's solution to solve your problem.

     

    Regards,

    Daniel He

  • Anonymous's avatar
    Anonymous
    Not applicable

    What though if we're using a live connection and can't create additional columns?