Hi. How can we help?

Pivoting

Pivoting data is a way of reporting on two major dimensions at once, by turning a list of results into a table of results.

In this example, there are two dimensions of sales from the past four months — the first dimension being Top Level Category, and the second dimension being Completed Month.

When we add two dimensions, it creates a list of data:

two_dimensions_data_list.png

But when we pivot on the Completed Month and then run again:

pivot_completed_month.png

The results are displayed on a much clearer table:

pivot_completed_month2.png

Our data is identical, but it is easier to read quickly.

On the Data tab, we can also now select checkboxes for Totals (Column totals) and Row Totals:

totals_and_row_totals.png

This adds space onto our table for totals:

table_totals.png

And when we run again, we get summary results to measure categories, months, and the overall total:

categories__months_and_overall_total.png

The most common kinds of pivots are reading results over time, day-over-day, month-over-month, year-over-year (as in the example above), and looking at sales or inventory activity in Multi-Store environments.

multistore_environment.png

Just like dimensions, we can add two layers of dimensions to pivots:

two_layer_dimensions.png

Calculations can respond to pivoted dimensions, just as non-pivoted dimensions. Say, for example, I want to highlight results from just one store, I would prepare it no differently than I would any other calculation:

pivot_calculation.png

In this instance, my calculation looks like this:

if(${shops.name}="name82373","We Love Disco",null)

If I have saved it properly:

pivot_calculation_result.png

Similarly, I can prepare compound IF statements looking at either pivoted or non-pivoted dimensions:

if_statement.png

So in this instance, my calculation looks like this:

if(${shops.name}="name82373","We Love Disco",if(${cl_category_tops.top_level_category}="CLOTHING","Time for Cookies",null))

If I have saved it properly:

if_statement_result.png

Just like regular dimensions and measures, pivoted measures have a special set of functions too.

 

Was this article helpful?

0 out of 0 found this helpful