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
roncruiser
Post Patron
Post Patron

Show Values Between STRT and STOP values not working

Hi,

 

I have this measure which is giving me trouble:

 

=COUNTROWS(FILTER( '2D',

t_axis[Sum of t_Axis] >= CALCULATE(MAX('2D'[Value]), '2D'[PARAM] = "STRT")

&&

t_axis[Sum of t_Axis] <= CALCULATE(MIN('2D'[Value]), '2D'[PARAM] = "STOP")

)

)

 

The t_axis represents the X-axis of the table:

bad1.jpg

 

The table plots up to the STOP values but totally ignores the STRT values.  All the STRT values are at zero.

I need it to show the (conditionally gray) values between the STRT and STOP.

 

This is what it's suppose to look like:

good1.jpg

I need help with this one.  Been working on this all day.  The STRT values shouldn't be ignored in the measure.  I'm missing something in the syntax.

 

The file:

https://drive.google.com/file/d/1BY1EN9WK2Jfvt-YTrTbTb6CQ9jJSUhyW/view?usp=sharing

 

Hope to hear from someone.  

Thanks!

 

 

2 REPLIES 2
roncruiser
Post Patron
Post Patron

@amitchandak 

 

Not quite there yet but thank you for your help.
You are super close!  😊

 

The data contains different components.  The overlapping data should sum.  For example:

 

Here are two components of the data separated.  There are more components to the data but I show two for simplicity.

separated.jpg

 

When the same two components are combined there are two display possibilities:

 

 

1) My Requirement:  The overlapping data is summed and all values between STRT and STOP are displayed for each separate component. Notice the sum of 2 in the overlapping cell.  The black area is the non-overlapping data and the sum of these cells are 1.

(I manually constructed the example below)

combined_yes.jpg

 

2) With the Measure solution you provided only the overlapping areas are displayed and all the values between STRT and STOP are not displayed for each separate component.

Notice the sum of 1 in the overlapping cell.  All overlapping components are sum of 1.

combined_no.jpg


Hope that makes sense. 

I'm still stuggling with the measure.  I'm sure it's something simple but I have not figured it out yet.

 

Thank you....

 

amitchandak
Super User
Super User

@roncruiser , Try if this can work

 

=
Var _max =CALCULATE(MAXX(filter('2D', '2D'[PARAM] = "STRT"),'2D'[Value]))
Var _min =CALCULATE(Minx(filter('2D', '2D'[PARAM] = "STOP"),'2D'[Value]))
return
COUNTROWS(FILTER( '2D', t_axis[Sum of t_Axis] >= _max && t_axis[Sum of t_Axis] <= _min )
)

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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