Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello everyone, my question and a current problem is how can I select a specific customer in the graph and it correctly returns my top 5, the top 5 only works correctly when I perform the filtering through a specific filter, which in this case is typing the customer's name , but I would like if just by selecting the customer the data would adjust, for the other graphs it works properly, except for the top 5.
Field 1 - Manual Filter.
Field 2 - Bar chart that you would like, once selected, to properly filter the top 5.
Field 3 - Top 5.
Solved! Go to Solution.
You can use DAX measures combined with slicers or filters. Here's a general approach you can follow:
Create a Measure for the Top 5 Customers: You need to create a DAX measure that calculates the relevant metric for your customers and returns the top 5 based on the selection.
Use a Slicer or Filter for Customer Selection: Ensure you have a slicer or filter visual on your report page that allows users to select a specific customer.
Apply the Measure to Your Visual: Apply the DAX measure you created in step 1 to the visual that displays the top 5 customers. This visual could be a table or a bar chart, depending on your preference.
Here's a sample DAX measure that calculates the metric (let's call it "Metric") and returns the top 5 customers based on the selected customer:
Top 5 Customers =
VAR SelectedCustomer = SELECTEDVALUE('Customer'[CustomerName])
RETURN
TOPN(5,
FILTER(ALL('Customer'),
'Customer'[CustomerName] = SelectedCustomer
),
[Metric], DESC
)
Replace 'Customer'[CustomerName] with the actual column reference to your customer names, and [Metric] with the actual metric you're measuring (e.g., sales, revenue, etc.).
Once you have the measure in place, you can apply it to your visual representing the top 5 customers. When a specific customer is selected in the slicer or filter, the top 5 customers visual should adjust accordingly based on the selected customer.
If you encounter any issues or need further assistance with implementing this in Power BI, feel free to provide more details, and I can assist you further.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
You can use DAX measures combined with slicers or filters. Here's a general approach you can follow:
Create a Measure for the Top 5 Customers: You need to create a DAX measure that calculates the relevant metric for your customers and returns the top 5 based on the selection.
Use a Slicer or Filter for Customer Selection: Ensure you have a slicer or filter visual on your report page that allows users to select a specific customer.
Apply the Measure to Your Visual: Apply the DAX measure you created in step 1 to the visual that displays the top 5 customers. This visual could be a table or a bar chart, depending on your preference.
Here's a sample DAX measure that calculates the metric (let's call it "Metric") and returns the top 5 customers based on the selected customer:
Top 5 Customers =
VAR SelectedCustomer = SELECTEDVALUE('Customer'[CustomerName])
RETURN
TOPN(5,
FILTER(ALL('Customer'),
'Customer'[CustomerName] = SelectedCustomer
),
[Metric], DESC
)
Replace 'Customer'[CustomerName] with the actual column reference to your customer names, and [Metric] with the actual metric you're measuring (e.g., sales, revenue, etc.).
Once you have the measure in place, you can apply it to your visual representing the top 5 customers. When a specific customer is selected in the slicer or filter, the top 5 customers visual should adjust accordingly based on the selected customer.
If you encounter any issues or need further assistance with implementing this in Power BI, feel free to provide more details, and I can assist you further.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
19 | |
11 | |
10 | |
8 | |
7 |
User | Count |
---|---|
20 | |
13 | |
8 | |
7 | |
6 |