Skip to main content

DataFrame Slicers

One of the best ways to explore large amounts of data is using slicers.

Slicers as menubar

Any field in the DataFrame can act as a slicer. By default the slicers are displayed as dropdowns in a menubar on top of the filtered dataframe that is reactive to the slicers.

Loading...

Filtered Counts

When choosing an option from a slicer, that option may or may not be applicable based on all the other filters that are currently in effect. By default slicers show the total count for each option. It is possible to also see the filtered counts that are dynamically computed as filters are being applied.

performance

This option enhances the usablity as it clearly provides visual indication of which values are still relevant. However, since the filtered counts need to be computed for each slicer as options are being selected, it requires a lot of processing. Total number of rows being sliced and the number of fields being used for slicing impact the performance. Keep this performance in mind while enabling this option.

Loading...

Inline slicers

Slicers can be placed inline so they can all be seen together. By default inline slicers are placed on the right side.

Loading...

Hierarchical Slicers

It is possible to slice using natural hierarchies such as Location and Time.

Loading...

Slicing by measures

It is possible to slice the data not just based on the count but by any other aggregations such as sum and average.

Sorting within Slicer

It is also possible to display the slicer options sorted by any of these measures

Loading...

Slicing a chart

It is possible to slice a chart, not just the DataFrame.

Loading...

Slicing multiple visuals

Multiple visuals based on the sliced df can all be displayed together and the slicers are applied on all of them.

Loading...

Slicing on calculated fields

Loading...

Slicers & Drillpath

Loading...

Slicers & Dynamic Charts

Slicers are a perfect match for dynamic grid charts. They allow filtering a dynamic chart with ease to focus on a subset of values for which the chart is repeated along the row and/or column.

Below is a dynamic chart with sales channel along the rows and order priority along the columns. It is rendered along with slicers for these two dimensions. This allows a user to pick one or more values for each of these dimensions to adjust how they visualize the chart.

Single/Multi-select

Click on the M/S button of each slicer to toggle them to multi-select mode.

Include/Exclude selection

Click on the E/I button of each slider to toggle inclusion or exclusion of the selected values.

Loading...

Slicers & Scorecard Charts

The following scorecard chart displays percentage of grand total. When using slicers care should be taken on how the percentage is calculated. By default, doing grand total on the filtered (sliced) dataframe results in the percentage of totals being recomputed using grand total of the filtered data. Often this is not what is desired. Rather what is desired is the percentage with respect to the unfiltered data.

This is achieved by using aggregate subselect that can compute the grand-total on the unfiltered DataFrame.

Uncorrelated subquery optimization

SQL Frames has optimization in place to compute uncorrelated aggregates only once for the entire query. Hence, computing the grand-total value using the sub-query shouldn't be a performance concern.

Loading...

Slicers & Array Fields

Array fields can be used in the slicer. The individual values of the array are used to provide the slicing. Array fields can't be used as hierarchical slicers.