The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
So right now, i have a bar chart, a dropdown for top N, field parameters for the aggregated value and legend (seen in the first image).
Without adding legends, the top N works fine. But once I add a legend into the Legends field of the bar chart, the top N breaks. In this example, I selected top 5 bars. After adding the legend, it shows more than 5 bars.
I created 3 parameters:
- value_filter: contains the aggregation values (ie agg1, agg2)
- legend_filter: contains the aggregation values (ie legend1, legend2)
- top: a series from 1 to 10
I created 2 measures,
- "rank": sort the bars by the selected aggregated value.
- "topN": show the top N values
Below are the DAX codes for my measures
Solved! Go to Solution.
You can consider using a purely graphical solution. The filter pane already has a TOPN filter premade for you.
You can consider using a purely graphical solution. The filter pane already has a TOPN filter premade for you.
but if i use the filter pane and set top N by agg1,the top N wouldn't change when I use the parameter filter to change to agg2
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
13 | |
10 | |
10 | |
9 |