Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
aizamkamadin
Helper II
Helper II

How to show above 4 country on selected/filtered value

pbifiltered.png
i want to show 4 countries above selected country in horizontal view.

if i choose MALAYSIA as the country..

the result should be like this

United Arab EmiratesHongKongLuxembourgEgyptMalaysia
5.115.105.035.034.91

 

Thanks for your help.

5 REPLIES 5
Anonymous
Not applicable

Hi @aizamkamadin ,

 

Here's my solution.

1.Create an index column in the power query editor.

vstephenmsft_0-1661247080441.png

vstephenmsft_1-1661247120937.png

 

2.Create a country name table using dax. It is used for the slicer.

Table 2 = DISTINCT('Table'[Country_Name])

vstephenmsft_2-1661247210096.png

 

3.Create a visual-level measure for filtering.

Measure = var _sel=CALCULATE(MAX('Table'[Index]),FILTER(ALLSELECTED('Table'),[Country_Name]=SELECTEDVALUE('Table 2'[Country_Name])))
return IF(MAX('Table'[Index])>=_sel-4&&MAX('Table'[Index])<=_sel,1)

 Put it into the visual level filters, set up show items when the value is 1.

vstephenmsft_3-1661247431877.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

thanks for sharing your solution..

but sorry i cant use ur solution, because it need manually key-in the index
fyi i have 132 country multiply with 81 indicators..

 

tmrow i'll share my current solution..its not perfect yet.. but it can filter out the above country automatically using data format..

 

 

Anonymous
Not applicable

Hi @aizamkamadin ,

 

Any update?

 

Best Regards,

Stephen Tao

Anonymous
Not applicable

Hi @aizamkamadin ,

 

Or you could try to create the index by dax.

Here's the method in this post:

Solved: Index in DAX - Microsoft Power BI Community

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@aizamkamadin , In a matrix visual. Do not use Row. Use column on Country.

 

If needed use option- Switch Values to row

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.