cancel
Showing results for 
Search instead for 
Did you mean: 
Community_Admin
Community Team Member
Community Team Member

Analytical Need 

You want to display a chart/table with the Top X and Bottom X, all in the same widget 

Community_Admin_0-1634210018875.png

Modeling Challenge

Sisense allows setting ranking filters based on a measure, but this is only for Top OR Bottom.

Solution

Widget Filter:

  • Create your widget, with the value you want to rank by (for ex. sum( [Visits] ) ).
  • Create the rank filter measure
  • Start with the RANK function to rank the values DESC
  • Wrap the RANK function with an IF statement, saying IF (Rank <= X , 1, 0).  This will return a value of 1 if the member is in the top X
  • Repeat this, but switch the RANK to a DESC in order to get a value of 1 if the member is in the bottom X
  • Add these two IF statements together, which will give you a value of 1 for Top X members and the Bottom X members
  • Create a widget filter from your formula, that filters where the value = 1
Community_Admin_1-1634210018821.png

(Optional) Include the ranking:

  • If you just try to add your RANK function to the widget, it won't work.  This is because the values in the widget are sliced by the widget filter down to just the Top/Bottom X, and then the RANK is calculated (which means the RANK will just show values of 1-10).
  • Create the true rank formula
  • Start with the RANK function to rank the values DESC, and wrap it within an IF statement
  • If the rank <= X, then just display the rank
  • else, count the unique values of the dimension and subtract the rank ASC + 1
Community_Admin_2-1634210018800.png

Example Dashboard: Download

Version history
Last update:
‎10-14-2021 04:14 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Need additional support?:

Community Support Request