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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
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.