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
Othello00
Frequent Visitor

Show only values for the time between a start and end time for multiple rows

Hi!

 

I have two datasets that are not connected. The first records the flow for 4 different panels every minute. The second is a table where we record every test we make. For each test we are using either panel 1 or 2 for the first round and then either panel 3 or 4 for the second round. In the test table every test (ID) have a start and end time for both rounds.
Test table:

Othello00_0-1606993343850.png

Flow table:

Flow.PNG

 

Now I want to plot the flow for the selected ID. With this measure it works if I only want to see the flow for one ID:

 

Flow per ID =
var _start = CALCULATE(MIN(Tests[Start Panel 1 or 2]))
var _end = CALCULATE(MAX(Tests[End Panel 1 or 2]))
return
CALCULATE(SUM('Flow table'[Flow]), FILTER('Flow table', 'Flow table'[Time]>= _start && 'Flow table'[Time] <= _end))
 
I use a slicer to change between the panels, as I don't know which panel is being used for each test until I see the flow.
My problem is that I want to select multiple IDs and only show the flow between the start and end time for those IDs. With my measure it finds the min start time for the first ID and max end time for the last selected ID and shows me the flow for all the time in between. Any ideas on how I can only show the flow between the start and end time for each of the selected IDs? The time between can be a line or something, as long as I don't see the value of the flow on a time that is not between a start and end time for the selected IDs.  
Select.PNG
 
 

 

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

@Othello00 

If you cannot place the ID on the legend (why not??) I'm afraid you'll have to create multiple measures. For instance for ID1:

Flow ID1 =
CALCULATE([Flow per ID], Table1[ID] = 1)

and same pattern  for the others. Another option would be to use calculation groups

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

View solution in original post

3 REPLIES 3
AlB
Community Champion
Community Champion

@Othello00 

If you cannot place the ID on the legend (why not??) I'm afraid you'll have to create multiple measures. For instance for ID1:

Flow ID1 =
CALCULATE([Flow per ID], Table1[ID] = 1)

and same pattern  for the others. Another option would be to use calculation groups

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

Othello00
Frequent Visitor

Hi @AlB ,

 

Thank you for your reply! 

 

Putting the ID on the legend solves the problem I described. Unfortunally, this is a simplification of my problem so I don't have that option. I have to put multiple measures on the chart showing flow of both air and O2 etc. Do you know if I can get the same result by rewriting my measure?

AlB
Community Champion
Community Champion

Hi @Othello00 

I'm not completely sure I follow but try this

1. Place ID also on the legend of the chart, so that yiou have different lines

2. Modify your measure a bit:

Flow per ID =
var _start = CALCULATE(MIN(Tests[Start Panel 1 or 2]))
var _end = CALCULATE(MAX(Tests[End Panel 1 or 2]))
RETURN
    CALCULATE (
        SUM ( 'Flow table'[Flow] ),
        'Flow table'[Time] >= _start,
        'Flow table'[Time] <= _end
    )

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

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