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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculate column based on range in other table

Hey folks,

 

I'm looking for some assistance 🙂

 

I have a web form (response stored in SQL db) that team members complete on a particular date/time with the responses stored like so:

 

Capture2.JPG

 

Teams run in various iterations/sprints (different table) (see below):

 

Capture1.JPG

 

Rather than group the responses by date/month, we want them to be grouped by Sprint/iteration name (in the scenario above for example the responses would be for 'Sprint 10).

 

What would be the best way to go about it? No relationships between the two tables currently.

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

Try creating a column or measure as follows:

column:

Column =
MAXX (
    FILTER (
        'Sprint',
        Sprint[StartDate] <= Response[Date]
            && Sprint[EndDate] >= Response[Date]
    ),
    [IterationName]
)

column.PNG

measure:

Measure =
MAXX (
    FILTER (
        'Sprint',
        Sprint[StartDate] <= MAX ( Response[Date] )
            && Sprint[EndDate] >= MAX ( Response[Date] )
    ),
    [IterationName]
)

measure.PNG

For more details, see the attached PBIX.

Best regards

Icey

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

View solution in original post

4 REPLIES 4
Icey
Community Support
Community Support

Hi @Anonymous ,

Try creating a column or measure as follows:

column:

Column =
MAXX (
    FILTER (
        'Sprint',
        Sprint[StartDate] <= Response[Date]
            && Sprint[EndDate] >= Response[Date]
    ),
    [IterationName]
)

column.PNG

measure:

Measure =
MAXX (
    FILTER (
        'Sprint',
        Sprint[StartDate] <= MAX ( Response[Date] )
            && Sprint[EndDate] >= MAX ( Response[Date] )
    ),
    [IterationName]
)

measure.PNG

For more details, see the attached PBIX.

Best regards

Icey

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

Anonymous
Not applicable

@Icey thanks - this (column) was the solution I was after - thanks to the others for a quick response too 🙂

 

amitchandak
Super User
Super User

I did not get it completely. But refer if this can help

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

 

Appreciate your Kudos.

 

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
Greg_Deckler
Community Champion
Community Champion

I just created this recently:

https://community.powerbi.com/t5/Quick-Measures-Gallery/LOOKUPVALUE-Range/td-p/974201

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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