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! Request now

Reply
Anonymous
Not applicable

Get value on a record where the date falls between two dates

Hi i have a calendar table and I'd like to pull the iteration from another table into a new field or measure

Here's  a screen print of my objective

StevenT_0-1670943468260.png

So if the date on the left is between 12/26/18 -01/08/19, I want to reference the Iteration-Original,which is 2018Q4-IP

if the date on the left is between 01/09/19 -01/29/19, I want to reference the Iteration-Original,which is 2019Q1-1

How do i write a measure or create a column to do this?

If a column, would it be better to create it as a power query column or a dax column?
I'm thinking that a new column where the iteration-Original can be added, as compared to a measure, but not sure.

Open to any suggestion.
Thanks, Steve

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@Anonymous 

A column like this should get you what you are looking for.

 

Iteration = 
VAR _Date = [Date] 
RETURN
CALCULATE(
    MAX ( Iterations[Iteration-Original] ),
    Iterations[IterationStartDate] <= _Date && Iterations[IterationEndDate] >= _Date
)

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@Anonymous 

A column like this should get you what you are looking for.

 

Iteration = 
VAR _Date = [Date] 
RETURN
CALCULATE(
    MAX ( Iterations[Iteration-Original] ),
    Iterations[IterationStartDate] <= _Date && Iterations[IterationEndDate] >= _Date
)

 

Anonymous
Not applicable

Your code made the difference. I did make a few modifications but your code acted as a template and I can use it going forward.  Thanks!

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