Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 Emirates | HongKong | Luxembourg | Egypt | Malaysia |
5.11 | 5.10 | 5.03 | 5.03 | 4.91 |
Thanks for your help.
Hi @aizamkamadin ,
Here's my solution.
1.Create an index column in the power query editor.
2.Create a country name table using dax. It is used for the slicer.
Table 2 = DISTINCT('Table'[Country_Name])
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.
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..
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.
@aizamkamadin , In a matrix visual. Do not use Row. Use column on Country.
If needed use option- Switch Values to row
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |