Combine multiple Line Items using Table Calculations

Knowledge Drop

Last tested: Apr 24, 2020
 

Usually, if I have a list of dimensions and measures, if I want to change the group by I would use a case when in LookML, but what happens if I do not have access to LookML? Who do I call?

In a series of table calculations, you can alter the grouping.

In the example below, I wanted to combine the counts for dogs named Princess and Buddy. I wanted to replace the Princess count with this new combined count, then hide the original count for dogs named Buddy.


Original Explore:

Screen Shot 2020-04-24 at 7.41.52 PM.png





This table calculation grabs the values from dogs name Buddy and Princess and puts them in a new column. All other row values are zero.

VALUE.png



This lets us replace the dogs' named Princess value, with our combined value from before:

COMBINED.png

This allows us to hide the original Buddy value from the visualization.

YESNO.png

Here is our final result:
EXPLORE_RESULT.png

This content is subject to limited support.                

Version history
Last update:
‎06-14-2021 05:56 PM
Updated by: