Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

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?

Unbenannt.PNG

 

1 ACCEPTED SOLUTION

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.

 

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

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

v-danhe-msft
Microsoft Employee
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

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Arentir
Resolver III
Resolver III

Hi @Anonymous

 

It won't work as a measure, you should have a new column in your date table to identify latest date ("Y" / "N" for instance). Then you can use that as a filte.

 

A good article on the subject:

https://www.fourmoo.com/2018/09/11/power-bi-default-slicer-selection/

 

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.

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

Anonymous
Not applicable

Hello @Arentir

Thank you for your answer. So far, i didnt manage to get it to work.

I dont know if i understand you correctly:

I have a slicer(?) with all dates available in the column. I already ordered it desc so the latest date is the first one.

1.PNG

I tried to use a calculated column with the [Yesterdays Date] value but dont know how to apply it properly.

I also tried to figure out what you mean with a latest day flag column, as a own column it basically would only have one row or not? (9.10.2018)

 

 

I hope you see what i mean.

Thank you and kind regards

Hi @Anonymous,

 

See the PBI example attached, I have a calendar table and added two columns: one for latest date in the table and one for yesterday

 

See how the Flag slicer change your date slicer. Let me know if it works for you

 

https://1drv.ms/u/s!As5oZCclkGkWgSqo1vvqL-qtMxif

 

Anonymous
Not applicable

Hello @Arentir

 

Thanks for your file.

I had a look at it and understood it.

I built it into my existing report.

When i check the "use yesterday" filter it removes all other dates, but the user still has to select it in the dropdown.

I have to use the dropdown as there can be many entries if the user selects "no"

Is it possible that the dropdown selects the entry if only 1 is available? Or is this the limit?

Unbenannt.PNG

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.

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.