Solved

Delete items in a Dimension

  • 28 November 2022
  • 2 replies
  • 176 views

Userlevel 4
Badge +6

Hello Pigment Community!

I would like to delete an item in a Dimension (which has been created by an error in the settings when importing data), but because this Dimension is used by several blocks, I don’t want to delete data in these other blocks. 

Could you please help me to find a way to see if said item is used by other blocks and if I can simply delete the line containing the wrong item in the Dimension?

Thank you! 😊

icon

Best answer by francois 28 November 2022, 17:45

View original

2 replies

Userlevel 6
Badge +14

Hi Élodie,

There’s currently no automated / systematic way to look for all the specific places where there’s data on a specific items.

If I were to delete an item and make sure there’s absolutely no data associated, here are the steps I’d follow.

To make the example easier to follow, I’ll try to delete the item "François" from my Employee dimension.

Looking for the different kind of data

You can have three different types of data entry:

  • data associated with the item, e.g. on a block that uses the employee dimension in its structure
  • a mapping in metric / property formatted (Employee format)
  • your item is specifically called in a formula (e.g. FTE[FILTER: Employee."François"])

By looking at the Library & usages section in the Employee settings, I have access to all blocks that use the Employee dimension, as a structure, dimension or in its formula.

 

As you can see, I have 16 blocks to check in my application. Don’t worry! Not all blocks contain raw data, and that’s what we’re hoping to save.

 

Most data is stored in editable metrics, either with no formula or with a metric override. These can be found by looking at all metrics in your application and filtering based on your Employee dimension. The filter is available at the top-right of the All Blocks window.

 

You can either select Overide on or Without formula, which are the only two types where you might have raw data. Outside of these types of blocks, there should not be any raw data (that’s meaningful to you).

 

If your data is in a dimension list or a transaction, the fastest way is just to use the block settings > library and usages and clicking on the various lists that could use it as a format.

 

Checking for a mapping in a metric / property

My employee dimension is used as a format in my Manager by Employee metric.

Here, I want to check if François is used anywhere in a cell. I can simply open a formula playground and look for the relevant combinations:

In that case, I’ll need to update Reidar, Snanon’s manager before deleting the item.

This will work with any number of dimensions in the structure of the metric, but also for properties (e.g. Employee.Manager = Employee."François")

 

Checking for data associated with your item in a metric

To check for data associated with your item, you can either open the block and look for the value, or just check in the formula playground.

Opening the view, adding the Employee as a Pivot

I do find the Formula Playground to be easier to set up though

Being set up with Automatic Structure and the default Hide Empty Rows and Columns makes it easy to spot whether there’s data associated.
 

 

Looking for references in formulas

This shouldn’t happen because you state that the creation of the item was due to an import error, but this might be useful in the future.

Since this is not raw input data, it won’t be deleted after the item is deleted - you’ll see an error on the problematic metric stating that it’s referencing an item that doesn’t exist.

You can simply change the formula to get rid of this specific part, or replace it with something more meaningful.

 

Good job on making sure you don’t delete data though! I hope this guide will make you more confident with removing an item from a dimension in Pigment.

Userlevel 4
Badge +6

Thank you very much @francois!! 😍

Reply