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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Martin_Songstad
Frequent Visitor

How to check whether a value is between two values on the same row of a (possibly sliced) table

Hi!

 

My age group table is nice and small, with min and max values (days) per age group (years):

 

Martin_Songstad_0-1681984568906.png

Users should be able to slice the data by ages, by selecting 81 and 83-year olds, but not 82-year olds, for instance.

In my measure, I have calculated the age (days) on the day of an event in [Alder]. If i filter the data like this:

Martin_Songstad_1-1681985640074.png

... i get the correct answer for the 81-year-olds and the 83-year-olds respectively, but my totals will include values from 82-year-olds, and we can't have that.

This filter fixes that, 

Martin_Songstad_2-1681986058182.png

but replacing my neat age-group-table with this huge generated one just feels wrong. 

Surely, there must be a better way to check whether the value is between two values on the same row of my age group table. 

 

Any ideas?

 

Martin

 

1 ACCEPTED SOLUTION
Martin_Songstad
Frequent Visitor

Solved it myself by iterating the measure over the age groups! Thanks!

If you have even better ideas, feel free to share.

View solution in original post

1 REPLY 1
Martin_Songstad
Frequent Visitor

Solved it myself by iterating the measure over the age groups! Thanks!

If you have even better ideas, feel free to share.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.