Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hi,
I have a list of ranked items in a table. I'd like to display only the selected value of the table from a filter, plus the two items above it and the two items below in rank order. So, for example, if I choose an item with a 36 rank, the table I want to display would show only items 34, 35, 36, 37 and 38. I'm not sure how to do this.
I've attached a sample pbix here https://drive.google.com/file/d/1fM3bhbxQ8Sr21ZBnrY3hQ_10VHg_IL5_/view?usp=sharing that has 50 items
Many thanks
Solved! Go to Solution.
Hi @BigPatJennings ,
Please try to add a card visual with below dax formula
Measure =
VAR cur_team =
SELECTEDVALUE ( TblRank[Team] )
VAR cur_rk =
CALCULATE ( MAX ( TblRank[Rk] ), TblRank[Team] = cur_team, ALL ( TblRank ) )
VAR tmp =
FILTER (
ALL ( TblRank ),
TblRank[Rk] >= cur_rk - 2
&& TblRank[Rk] <= cur_rk + 2
)
RETURN
CONCATENATEX ( tmp, [Rk] & ":" & [Team], "
" )
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @BigPatJennings ,
Please try to add a card visual with below dax formula
Measure =
VAR cur_team =
SELECTEDVALUE ( TblRank[Team] )
VAR cur_rk =
CALCULATE ( MAX ( TblRank[Rk] ), TblRank[Team] = cur_team, ALL ( TblRank ) )
VAR tmp =
FILTER (
ALL ( TblRank ),
TblRank[Rk] >= cur_rk - 2
&& TblRank[Rk] <= cur_rk + 2
)
RETURN
CONCATENATEX ( tmp, [Rk] & ":" & [Team], "
" )
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ah, I didn't think of using a card, that's excellent. Thank you very much.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.