This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi all,
I have a trend bar chart that want to show "Exclude top 5". It will show all months that is ranked 5 and above based on total volume.
This is the DAX I used:
Solved! Go to Solution.
Hi @kilala
Is DIM_TIME_PERIOD_SELECTED[Month_Year] custom sorted by another column? If so, you need to include that in your ALLSELECTED statement as well.
Hi Kilala,
you might need to use the ALLSELECTED function in your measure to break the local filter context of the x axis if you try the measure below.
Top 5 Vol (Trend) =
RANKX(
ALLSELECTED('DIM_TIME_PERIOD_SELECTED'[Month_Year]),
[Volume Selected],
,
DESC,
Dense
)
Then when you select your bar chart. drag the new meausre into the filters on this visual section and set the filter to is greater than 5.
Hopefully this helps.
Michael
Hi @kilala
Is DIM_TIME_PERIOD_SELECTED[Month_Year] custom sorted by another column? If so, you need to include that in your ALLSELECTED statement as well.
Hi @danextian ,
You are correct! This month_year column are sorted according to startperioddate column. I have included this column as well and it able to sort it correctly now.
Thank you for your reply and i wish your day would go smoothly!
Try forcing the month context explicitly:
Top 5 Vol (Trend) =
VAR CurMonth = SELECTEDVALUE ( DIM_TIME_PERIOD_SELECTED[Month_Year] )
RETURN
RANKX (
ALLSELECTED ( DIM_TIME_PERIOD_SELECTED[Month_Year] ),
CALCULATE ( [Volume Selected], KEEPFILTERS ( DIM_TIME_PERIOD_SELECTED[Month_Year] = CurMonth ) ),
,
DESC,
Dense
)
Then to exclude the top 5, use this as a visual filter:
Show Month (Exclude Top 5) =
IF ( [Top 5 Vol (Trend)] > 5, 1 )Put Show Month (Exclude Top 5) in the visual-level filters and keep only is 1.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 36 | |
| 30 | |
| 22 | |
| 22 |