Forum Discussion

PaulDBrown's avatar
PaulDBrown
Community Champion
6 years ago
Solved

Rank Visual over time

Hi community,

 

I am hoping someone may suggest a better visual representation of a rank over time. This is what I have so far:

 

Ideally I would like the line to be the inverse: ie. I'm trying to show that being ranked closer to 1 is better; now it looks like the higher number the rank is the better. 

 

Any suggestions?

Thanks.

  • PaulDBrown's avatar
    PaulDBrown
    6 years ago

    v-lili6-msft az38 

     

    Just an update on this theme of "inverting"  Y Axis and the relevant workarounds for the benefit of others who might be looking for a similar solution.

    The premise to the solution is to convert the rank number to a negative value by mutltiplying the rank * -1, and use this in a line visual. (The -1 will  appear higher, since it is a larger value, while - 15 will be below). The problem is that displaying a negative value in the labels is clumsy and counter-intuitive for the end user of the report.

    I did initially use the custom visual "Multiple Axes Chart" as suggested by Lin in this thread, but came across licensing issues and the fact that for some reason the label format in the chart seems to revert to default (with decimals) when published to my Workspace.

     

    To cut a long story short, I actually had a bit of a revelation when I remembered that we can actually create custom formats for measures etc in Power Bi since "recently" (I did actually look for this originally but couldn't find the way to custom format numbers in the usual "Measure Tools" or visual formatting pane). 

    And yet it is available, albeit somewhat hidden, by going into the modeling section in Desktop, selecting the measure and "Fields" list and going into properties. This is where you CAN create your custom number format.

    So I formatted my negative numbers to absolute number (got rid of the "-" symbol) and voilà!

     

     

     

     

    So I can now use the default Line Chart visual to create my rank trend (with the stepped layout which I think is perfect for a rank trend: it resembles a podium) with the best rank on top/ worst rank below and without displaying the rank as a "negative" number. Just what I was looking for.

     

    "Negative" numbers used to display rank

     

    Hope this might be useful for others!

9 Replies

  • az38's avatar
    az38
    Community Champion

    Hi PaulDBrown 

    multiply rank to -1 🙂

    do not hesitate to give a kudo to useful posts and mark solutions as solution
    Linkedin

    • PaulDBrown's avatar
      PaulDBrown
      Community Champion

      az38 

      Thanks for the suggestion.. I did consider that option but would rather avoid displaying negative values in the labels.

      Do you know a way of avoiding this?

      • v-lili6-msft's avatar
        v-lili6-msft
        Community Support

        hi PaulDBrown 

        There is currently no option to invert the Y axis in your chart.

        Here are two workaround for you refer to:

        1.  change the ASC to DESC in your rank measure

        RANKX ( <Table>, <Expression> [, <Value>] [, <Order>] [, <Ties>] )

        Order Optional

        The order to be applied. 0/FALSE/DESC – descending; 1/TRUE/ASC – ascending.

         

        2. To make the graph look positive , we can make a measure for the values and then multiply it with -1.

        Then download a "multiple axis chart - XViz" and drag your measure into the values section. This will display an inverted chart but will show the data as negative values.

        To change this go to number format and turn on semantic formatting.

        Change the negative value format and positive value format to (X). You can change their colours as well. This will now show the values without the negative sign.

        of cource, you could disable Y-axis for this visual.

        for example:

         

        Regards,

        Lin