Format or style field in bytes

I just want to know if there is a way to ask a question and in the result of the table to be able to give a style to a numeric column that are bytes, just as you have the style of percent, scientific or currency, to assign the bytes value so that it is automatically represented to KiloBytes, MegaBytes, Gigabytes and so on depending on the value.

In this case what I want to represent is a value within the Radius standard called the Accounting Input Octets field for example.

I understand that I can use a custom column doing the direct conversion to Gigabytes but it would be a fixed value having values like 0.002Gb, but I lose dynamically that the graph will represent the value automatically if they are KB, GB... etc...
I just want to confirm if this can be done in a paid version in Metabase? or it is not available in any version?

1 Like

I would do that with custom columns and case statements

Hi @Luiggi , thanks for you reply...

Thank you very much for the suggestion, I was working on it but I can't figure out how you can graph or represent this data in a grouped way (dynamically).

I don't like the idea of converting them all to Gigabyte since there are sessions that only consume Bytes or Kilobytes, where a number like 0.0024Gb would be seen.

Now what worked to start with were two custom columns, one to give me what kind of Unit I'm working with:
-B
-KB
-mb
...

  • Up to Pb

As well as another customized column where it evaluates if it falls in Kb, Mb, Gb.... then I do the respective conversion.

But when I do this I have a session or user within the time line that reports that it consumed 1 Kb, then after 5min it reports a consumption of 5Mb, after 5min another 2Gb, in this case I cannot do a sum of Kb, Mb or Gb. since they are not equivalent to the same.

Excuse my despair but I come from ELK where you simply select what type of value the column had and say "Bytes" and automatically perform all the conversions, both in tables and when graphing.

But I see that Metabase only brings for Currency, percentage and scientific.

We continue to evaluate the tool.

I'd love to have this. I'm happy to make a PR for this if directions are given

We really need this feature as well!! I Would love to see it in the product. B