Sign In

Welcome Back,

Signup/Login with your account

You must login to ask a question.

You must login to add post.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

  • 0
mkishore@lumenore.com
Beginner

Multiple column sorting

I need to show a bar chart where the sorting needs to be based on 2 columns

  1. Deal probability – Descending

and then by

  1. Current Month Closure Probability

If I add these 2 columns 1 below the other in the sort box, it is still sorting by Deal probability alone.

Leave an answer

You must login to add an answer.

1 Answer

  1. You must combine both columns into a single numeric sort key.
    1. If Deal Probability is text like:

    • High

    • Medium

    • Low

    Create a calculated measure mapping first:

    example :

    CASE when “Deal Probability”=’High’ then 3
    when “Deal Probability”=’Medium’ then 2
    when “Deal Probability”=’Low’ then 1
    end

    Name this calculated measure as “Deal_Probability_Value”
    2. Now create another measure as “SortKey” with a formula
    “Deal_Probability_Value” * 100000 + “CurrentMonthClosureProbability”
    3. Now add SortKey is Sort section of the chart with Desc order selected

    ✔ Result:

    • First sorted by Deal Probability (DESC)

    • Ties resolved by Current Month Closure Probability