Search code examples
looker-studio

How can you exclude a large large initial value from a running delta calculation?


I'm trying to use a running delta calculation to graph how much additional storage is used per hour, from a field that contains how much storage is used. Let's say I have a field like disk_space_used_mb. If I have the values 50000, 50100, 50300, the running delta would be 50000, 100, 200, but I don't really care about the first value, and it throw off my graph. I can of course set the max value of the y axis manually, but that isn't dynamic.

How can I prevent this first large value from throwing off my graph? is there a way to force that to 0?

Here's an example of why this is a problem (with different numbers): graph with large initial value


Solution

  • Sadly, this is currently not possible and it is a very common problem when plotting running delta.

    To workaround, if your initial value is static, you can create a new calculated field where you subtract the initial value from all rows (so the initial value will be always zero). But obviously, this is not an elegant solution and your chart Y-axis values will be different from the real values.

    But if the initial value can be changed by the user (it is dynamic), you're really out of lucky. The only solution I can imagine is to search for an alternative visualization that support this feature or develop your own visualization.

    The second option probably solves your problem, but the development of community visualizations is far from being an easy task.