How to change color of bar charts (top 5)

Zel
Zel Member

Hello. Can someone help me if there's a way to use a different color to indicate the top 5 items in the bar chart dynamically?

Tagged:

Best Answers

  • ColemenWilson
    Answer ✓

    Continuing with what @ArborRose is saying, you would create a beastmode something like this:

    DENSE_RANK(Number) OVER (ORDER BY Number)
    

    Then, in a color rule you would set the rule using the new beastmode field above and the condition would be less than or equal to 5.

    If I solved your problem, please select "yes" above

  • Ashleigh
    Ashleigh Coach
    Answer ✓

    @Zel does it need to be in an ETL? You should be able to use a pivot table in analyzer to achieve this and then just use the default sorting arrows. If you do need to do it in ETL you would do a group by first with a count distance values and then a rank.

    Here is what the pivot table would look like just using Table 1 in Analyzer.

    Here is what ETL should look like.

    Output:

    **If this answer solved your problem be sure to like it and accept it as a solution!

  • ArborRose
    ArborRose Coach
    Answer ✓

    Yes, ETL has a rank and window tile.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

Answers

  • You can use the rank and window tile to identify the top 5. Then set color rules.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • ColemenWilson
    Answer ✓

    Continuing with what @ArborRose is saying, you would create a beastmode something like this:

    DENSE_RANK(Number) OVER (ORDER BY Number)
    

    Then, in a color rule you would set the rule using the new beastmode field above and the condition would be less than or equal to 5.

    If I solved your problem, please select "yes" above

  • Zel
    Zel Member

    Thank you for your inputs. I'd like to ask, is there a way that I could achieve this in ETL?

    I have my raw data in Table 1. I want to transform it into something like what I have here in Table 2 thru ETL. I need to have the count of all alarm IDs per store in ETL and rank them accordingly. I tried the above solution but I'm getting 1 for all ranks. lol apologies.

  • Ashleigh
    Ashleigh Coach
    Answer ✓

    @Zel does it need to be in an ETL? You should be able to use a pivot table in analyzer to achieve this and then just use the default sorting arrows. If you do need to do it in ETL you would do a group by first with a count distance values and then a rank.

    Here is what the pivot table would look like just using Table 1 in Analyzer.

    Here is what ETL should look like.

    Output:

    **If this answer solved your problem be sure to like it and accept it as a solution!

  • ArborRose
    ArborRose Coach
    Answer ✓

    Yes, ETL has a rank and window tile.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **