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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
pezakas
Helper I
Helper I

Filtering dataset to show most updated data depending on date slicer

Hello community!

Here is a small example of my dataset and below i post what i am expecting as a solution. Please dont confuse the date in date slicer with the effective date. The date in date slicer will be used from a calendar table:

Dataset:

Effective DateIDStatus
8/8/2023001Pending
8/8/2023002Resolved
15/8/2023003Pending
22/8/2023001Resolved
22/8/2023003Resolved
22/8/2023004Pending

 

Date slicer selection 8/8/2023:

   8/8/2023
Effective DateIDStatusCurrent flag
8/8/2023001Pending1
8/8/2023002Resolved1
15/8/2023003Pending0
22/8/2023001Resolved0
22/8/2023003Resolved0
22/8/2023004Pending0

 

Date slicer selection 15/8/2023:

   15/8/2023
Effective DateIDStatusCurrent flag
8/8/2023001Pending1
8/8/2023002Resolved1
15/8/2023003Pending1
22/8/2023001Resolved0
22/8/2023003Resolved0
22/8/2023004Pending0

 

Date slicer selection 22/8/2023:

   22/8/2023
Effective DateIDStatusCurrent flag
8/8/2023001Pending0
8/8/2023002Resolved1
15/8/2023003Pending0
22/8/2023001Resolved1
22/8/2023003Resolved1
22/8/2023004Pending1
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pezakas ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a measure. 

Current flag = 

var _a=MAXX(FILTER(ALLSELECTED('Table'),'Table'[Effective Date]<=SELECTEDVALUE('calendar table'[Date]) && 'Table'[ID]=MAX('Table'[ID])),[Effective Date])
return IF(_a <=SELECTEDVALUE('calendar table'[Date]) && _a= MAX('Table'[Effective Date]),1,0)

(3) Then the result is as follows.

vtangjiemsft_1-1695798758508.png

 

vtangjiemsft_0-1695798742072.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @pezakas ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create a measure. 

Current flag = 

var _a=MAXX(FILTER(ALLSELECTED('Table'),'Table'[Effective Date]<=SELECTEDVALUE('calendar table'[Date]) && 'Table'[ID]=MAX('Table'[ID])),[Effective Date])
return IF(_a <=SELECTEDVALUE('calendar table'[Date]) && _a= MAX('Table'[Effective Date]),1,0)

(3) Then the result is as follows.

vtangjiemsft_1-1695798758508.png

 

vtangjiemsft_0-1695798742072.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

amitchandak
Super User
Super User

@pezakas , refer this example code

 

Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors