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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.