Home > Blockchain >  How to show 0s in pivot table in google sheets?
How to show 0s in pivot table in google sheets?

Time:12-24

I have the following data in my sheet: Picture dataset

What I am trying to achieve is a pivot table like this (where the columns are values of the "Date of P&L" column, rows are "CF/P&L/BS Account" columns' values, and values of the cells are summary of the "Sum" column): enter image description here

I already figured out I can use the built-in pivot table module in Google Sheets. But I can't find a way to show 0s instead of empty cells. I ended up with this result: enter image description here

Any ideas?

CodePudding user response:

You can do what Harun24hr suggests with MAP through all your QUERY. Please adapt your QUERY if it's not correct, I tried to create it from your image in the comments:

=MAP(TRANSPOSE(QUERY(A2:G,"SELECT B,SUM(C) group by B pivot G format B 'MMMM-DD'")),LAMBDA(f,IF(f="",0,f)))

enter image description here

  • Related