Forum Discussion
Line chart legend based on highest values
Hi, darko861
According to your description,I think you can add a rank column, then merge the rank and member column and name it rank_member,and finally change the legend of the line chart to rank_member. The steps are as follows:
step 1: Add column(rank)
rank =
RANKX (
'Table',
MAXX (
FILTER ( 'Table', [member] = EARLIER ( 'Table'[member] ) ),
[v_rpt_Time[Billable_Hrs]]] + [v_rpt_Time[NonBillable_Hrs]]]
),
,
DESC,
DENSE
)step 2: Add column (rank_member)
rank_member =
'Table'[rank] & "-" & 'Table'[member]step 3:Change legend
Best regards,
Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- darko8615 years agoResolver II
Hi v-yalanwu-msft , this does not seem to work. I have followed your steps, but you have to remember that your ranking formula is applied to the whole dataset in v_rpt_time data, which means all of the dates from 2019 to 2021. So if I want to showcase a specific date range it does give me the top 10 but it's still in the wrong order since the ranking is not dynamic or applied to that specific date range.