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

Get values which are within x of each other

Hi all,

 

I have two columns, Name and Value. Each name is unique and has a numerical value attacthed to it (from the Value column).

Now I would like to create a measure that returns those names and their values which are within 100 of each other. So essentially, the measure would have to check all values and place a mid point of 100 in this case and -100 and +100 as lower & upper bound range. 

 

Would this also be possible to make it so that the user can select the 'range'? So I'd have a front end visual with a text box or something and the user would type in 100 and then the visual would alter the results based on user input.

 

Eg

A - 100

B - 250

C - 200

D- 600

E- 350

 

Result

A - 100

B - 250

C - 200

E- 350

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@qnt013 , You can use what if paratmeter

 

a measure like

calculate(Sum(table[value]), filter(Table, table[value] >= [Whatifmeasure] ))

 

refer

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@qnt013 , You can use what if paratmeter

 

a measure like

calculate(Sum(table[value]), filter(Table, table[value] >= [Whatifmeasure] ))

 

refer

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

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 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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