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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Filter out data by dates till yesterday

Hello Powerbi Developers,

I am having one requirement.

I am having date column in which data is for whole year, but we want to show dynamically with help of Today() -1 function.

eg today is 11/10/22 i want to show data in dashboard till 10/10/22.

So how can we implement it.

Please help me out here on above issues/blockers.

Regards,

1 ACCEPTED SOLUTION

@Anonymous , You need to apply measure as visual level filter. Please refer the attached PBIX.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

8 REPLIES 8
Aburar_123
Resolver IV
Resolver IV

Hi @Anonymous ,

 

Please write the measure like below and place it in the visual level filter of the slicer

 

uptoTodayFlag = if(MAX(Date_Dim[Date])<=TODAY(),1,0)
Aburar_123_0-1665483650391.png

 

Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

You can create a measure as below and use it as filter on the visuals you want to apply this filter.

 

Measure = 
IF ( MAX ( 'Table'[Date] ) <= TODAY () - 1, 1, 0 )

Samarth_18_0-1665471750420.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Not Working !!

 

@Anonymous ,could you please show how you have implemented? or if you could share your PBIX after removing sesitive data?

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

I have this same question - I have a date table that has dates until the end of the year 2023, but I only want my slicer to show dates up until yesterday. 
I tried this measure but it doesn't accept it?

 

Measure =
IF ( MAX ( 'Dates'[FullDateAlternateKey]) <= TODAY () - 1, 1, 0)
 
Measure help.png

@Anonymous , You need to apply measure as visual level filter. Please refer the attached PBIX.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Ah, that works. Thank you!

 

One final thing, if I may.... I have two tables that each have their own date (in the same format). Is there a way to make one slicer do a filter on dates and pull back the necessary statistics? 

I can share my pbix file if that makes it easier

@Anonymous You could create a date table and join your tables to it. Then use date table on slicer. 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.