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

View all the Fabric Data Days sessions on demand. View schedule

Reply
lexxonnet
New Member

Display records effective on a specific date

I have an interesting conundrum, and I've tried a number of different approaches on the PowerBI forum and none really seem to help me crack this one.

 

I am trying to visualise a table, with a date filter that allows me to show which records are active on a specific date.

The table has the fields Effective From and Effective To which are date fields.

 

I've created a new date table, unlinked to the current one, as below:

lexxonnet_0-1668211045911.png

The measure SelValue in that table is set to MAX(CountriesDatePicker[Date]), which in itself is set using a slicer as below: 

lexxonnet_1-1668211110532.png

 

Now, the actual table uses a measure with the following formula to set if a record is active or inactive on the specific date:

 

Entry status = IF(Countries[Effective From] <= CountriesDatePicker[SelValue] && Countries[Effective To] >= CountriesDatePicker[SelValue] , "Active", "Inactive")
 
With the above - I'd expect this row (highlighted) to be listed as 'Active' when the selected value is in 2006, however, it is inexplicably inactive!
lexxonnet_2-1668211192443.png

 

Would appreciate any insights! The filter only ever seems to work when I set the filter to the latest date (i.e., today).

 

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

The ideal approach would be create one row for every data that lies betweenthe Effective From and Effective To dates.  The create a relationship (Many to One and Single) from the newly created date column to the date column of the Calendar Table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@lexxonnet , It Should follow the HR Blog  logic

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

file is attached

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors