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
bookhouseboy
Helper I
Helper I

Filter minutes in one table by start/stop times in another table

So this is probably very easy but I can't get it right. I have

  • one table with
    • one column of date/time by the minute,
    • and another column with number of transactions conducted in that minute
  • and another table with
    • one column with the names of certain events,
    • one column of date/time by the minute for the start of each event and
    • one column of date/time for the end of each event.

I just want to slice by event name and show the number of transactions only for minutes during the event selected.

I know this can't be hard but it just won't work. Can someone just point me in the right direction?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @bookhouseboy 

You can refetr to the following sample

Table1

vxinruzhumsft_0-1700101893077.png

Table 2

vxinruzhumsft_1-1700101901225.png

Create a measure

Measure =
IF (
    ISFILTERED ( 'Table (2)'[Events] ),
    CALCULATE (
        SUM ( 'Table'[Number] ),
        FILTER (
            'Table',
            [Date] >= MAX ( 'Table (2)'[StartDate] )
                && 'Table'[Date] < MAX ( 'Table (2)'[End Date] )
        )
    ),
    CALCULATE ( SUM ( 'Table'[Number] ) )
)

 Output

vxinruzhumsft_2-1700102049446.png

 

vxinruzhumsft_3-1700102055725.png

Best Regards!

Yolo Zhu

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
bookhouseboy
Helper I
Helper I

This looks very promising. I'll have to make a few adjustments, but I can see a path to success now. Thank you!

Edit: It works! Thank you so much!

Anonymous
Not applicable

Hi @bookhouseboy 

You can refetr to the following sample

Table1

vxinruzhumsft_0-1700101893077.png

Table 2

vxinruzhumsft_1-1700101901225.png

Create a measure

Measure =
IF (
    ISFILTERED ( 'Table (2)'[Events] ),
    CALCULATE (
        SUM ( 'Table'[Number] ),
        FILTER (
            'Table',
            [Date] >= MAX ( 'Table (2)'[StartDate] )
                && 'Table'[Date] < MAX ( 'Table (2)'[End Date] )
        )
    ),
    CALCULATE ( SUM ( 'Table'[Number] ) )
)

 Output

vxinruzhumsft_2-1700102049446.png

 

vxinruzhumsft_3-1700102055725.png

Best Regards!

Yolo Zhu

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

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