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.
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.
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |