cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Notice how Denmark's data above is significantly lower than the other country's.
In spite of not falling into the selected top 10 range, it will still show on the chart for comparison purposes.

Steps To Implementation

Preparation
  1. Duplicate the Break By Dimension Column in the EC. In our case we select the country with "Country" but apply a break by on the duplicated column "Country2". It's the same data.
  2. Create an integer ID custom column / SQL column of your dimension. The country in my case. You can use rankdenseasc(Country) for this. 
  3. Download and install the "Measured Filter" plugin from the Sisense Marketplace (Free)
  4. Set filter on the dashboard based on the original break-by dimension. In the case above, it is "Country". note, we are NOT using "Country2".

1. Setting Up The Widget Group, Values, Break By

Items: Set this to the Rows/X-Axis grouping dimension
Break by: Set this to the duplicated column of your break by dimension
Values:
  1. Create a function and call it top x
  2. Add the function below where
  • Max CountryRank is the Max() function around your dimension's integer ID
  • @country is the filtered measure configured to the dimension filter of your dashboard
  • and 999999999 is a value that is larger than any other values (this always puts it into the top N)
  • "Total CONFIRMED" is your desired aggregation. This can be AVG(revenue) for example.
  • ALL(DAYS) is the ALL function around your rows/X-axis dimension
case
when( [Max CountryRank] , [@country] ) = [Max CountryRank] then 999999999
else ( [Total CONFIRMED] ,ALL([DAYS]))
end
2. Set The Top N Widget Filter

3. Display Your Desired Aggregation

Disable top x by clicking the slider
Values 2 of 2: Add new value and enter your desired aggregation. This should be the same as the ELSE aggregation in step 1

Optional: Format The Color Of The Selected Dimension

Add this widget script to the widget:
The filter that selects the dimension must be the first filter in the filter panel.
// SET THE COLOR TO FORMAT THE SELECTED DIMENSION
var formatColor = '#FC312F'


widget.on("processresult", function(w, args){ 
        var selectedDim = w.dashboard.filters.$$items[0].jaql.filter.members[0]
 args.result.series.filter(i=>i.name==selectedDim)[0].color= formatColor 
})
Version history
Last update:
‎03-02-2023 08:34 AM
Updated by:
Contributors
Community Toolbox

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

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: