How to color only the top of DataView

Please tell me how to color only the top 3 numerical values in the data view.

Accepted Answer

  • Remo Bollhalder
    Remo Bollhalder Employee
    Third Anniversary 5 Answers 10 Comments 5 Up Votes
    edited February 15 Answer ✓

    Hi @Fujisawa Miku @Samson Sunny

    to add on Samsons ideas, if you need your solution to be dynamic you can:

    1. Use the counter on the sorted block and set an alert to "<=3" to highlight the top 3 values
    2. If the layout is not supposed to be sorted, you can use the "LARGE()" Formula in Nexel to list the top 3 values in a new Block. If the row entity is static you can use the deepest entity formula, otherwise you will have to get more creative. The formula would look something like this:

    LARGE([@a;*;*;Range.Whole],1)

    LARGE([@a;*;*;Range.Whole],2)

    LARGE([@a;*;*;Range.Whole],3)

Answers

  • Samson Sunny
    Samson Sunny Employee, Community Captain
    25 Answers 100 Comments Third Anniversary 25 Likes

    Hi @Fujisawa Miku,

    I have two ideas but not sure if they are the best ones,

    1. You can create a algorithm block with the "counter" ranking function to add a counter. Then enable a color alert on the block that you want you color the top 3 values. Use the "Use values of block" to refer to the counter block that you just created and configure the color alert accordingly.
    2. Use the sort functionality on the block within the layout settings to sort the values of the block in descending order. Then create a Nexel block to compare the values of the block you want to color with the 3rd highest value within the same block. Something like this: =if([@a;;]>=[@a;E001;*];1,0). This Nexel block that is created acts as a flagging cube for you to refer in the color alert "Use values by block" to color the top 3 values.

    Let me know if this is what you were expecting.