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

Generate table of similar values based on selected value

Case: I have a slicer with a list of customers and a table with customers and count of items. When a user selects a customer from the slicer, I want the table to populate with customers that have item counts within 20% of the selected value.

I currently have a measure that establishes 3 variables
1 - calculates the item count of selected customer: VAR SelectedCustomerCount = CALCULATE(SUM(Query1[item_count]), Query1[customer] = SELECTEDVALUE(Query1[customer]))

2 - establishes lower bound of item count: VAR LowerBound = SelectedCustomerCount * 0.8

3 - establishes upper bound of item count: Var UpperBound = SelectedCustomerCount * 1.2

 

The measure then gives a 1 to those customers within the upper and lower bounds (within 20%)

RETURN IF (calculate(SUM(Query1[item_count])) >= LowerBound &&
CALCULATE(SUM(Query1[item_count])) <= UpperBound, 1, 0)

I then put this measure as a filter in the table and set to equal 1. However, when I select a customer from the slicer, the table only returns the selected value - not any other customers that are within the range. Any ideas on how to solve this would be greatly appreciated!

2 REPLIES 2
lbendlin
Super User
Super User

I have a slicer with a list of customers and a table with customers and count of items.

The slicer must be fed from a disconnected table.

Anonymous
Not applicable

Hi, @Ean123 

Excuse me, whether his answer has solved your problem, and if so, please accept lbendlin's reply as a solution.


If you find a workaround yourself,
share your solution and accept it as a solution that will help other community members who have the same problem as you.
 

Best Regards,

Leroy Lu

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.