1

Is there any way to not to show an axis label if value is zero against that?

Suppose if a table is like below

Vehicles Sold per Brand jun-21 jul-21 ago-21 sept-21
Opel 2 4 3 5
Renoult 6 3 8 1
Ferrari 0 0 0 0
Mercedes 1 1 6 4
Seat 2 0 4 2
Others 12 11 15 16

If i want to not to get the graph of Ferrari in axis, what should I do?

enter image description here

I know that, I can hide that column if the graph is not to be shown for that. I can not use that since its a highly dynamic data and I dont want to go and hide it everytime.

Could somebody help?

Many thanks an advance

Max
  • 327
  • 1
  • 7

1 Answers1

1

So, quick and dirty:

enter image description here

But I would then produce the table of numbers so that any row not to be included gets removed and then build the chart with 5 only and not have the gap. I will let you work on that.

So, did that as well, but I will let you figure out how to control the Legend: enter image description here

The trick is to use large(), but you may need to be wrapping with if() to control 0 better...

Solar Mike
  • 7,156
  • 4
  • 17
  • 32
  • The solution is fantastic but how would you generate the names for column A? – Max Apr 14 '22 at 14:20
  • @Max The two formulae shown do that - they are set to do column A then as the relative addressing is set, you just drag right. Did that so it was easy to build the block of formulae... – Solar Mike Apr 14 '22 at 14:23
  • But if Ferrari has in June the value 2 (for example) it will not be appearing – Max Apr 14 '22 at 14:55