Solved

Filtering all metrics of a table

  • 3 February 2023
  • 2 replies
  • 158 views

Userlevel 2
Badge +1

Is there a way to filter from the view all metrics in 1 filter to exclude zero values from a table? 

If there is a table with a lot of data & we want to connect it to a gsheet, having many rows with zero values slow down things. 

icon

Best answer by Gawain 3 February 2023, 19:30

View original

2 replies

Userlevel 4
Badge +5

Hi Marina,

You’re right, keeping unnecessary “0” is generating useless calculation in any system, including Pigment.
To solve this I suggest you to add at the end of the formula of the metrics on the table this expression:


[filter: currentvalue<>0]

It will filter the “0” from the result of the formula for each metric.

The best practices would be to remove those “0” at the source to prevent unnecessary calculations throughout your model thus improving overall performance. You can look on the import step is you can filter those “0” before loading data in Pigment. If not then you can use the expression above to filter the “0” as early as possible in your dependancy diagram, or after any step that might create new “0” (like allocation for example) and that’s it!

Hope this helps

Userlevel 4
Badge +7

Hi @Marina! Hope you had a good week - did Gawain’s guidance above help? :)

Reply