# Remove Total rows from Quickbooks report



## abalserv (May 4, 2015)

hi Folks
Been playing around with Power Query and I'm experimenting with a QuickBooks file. I've got as far as loading it into PowerQuery, filling down names but now what I want to do is remove every row that has a prefix Total (as when I pull it from the QuickBooks file, it gives me headings per customer and a total per customer (which I can remove using native Excel tools) but now how can I set this up so that when I run it again..it will do the following..
1. Remove the first occurrence of a name (this is the customer name in Quickbooks - it has no data beside it) 
2. Remove the occurrence of a name with Total beside it e.g. Total Alex Blakey. 

So that when this query is run again, it will do all this automatically. Thank you


----------



## theBardd (May 4, 2015)

Presuming that the table has a column that is also blank on those rows, such as Date, you could create a measure and show this instead of showing the table value field


```
=IF( COUNTROWS( FILTER( Sales, Sales[Date] ) ),
    SUM( Sales[Sales] )
)
```


----------



## abalserv (May 4, 2015)

How would I set that up in Power Query?. I'm not using Powerpivot....thanks though


----------



## theBardd (May 4, 2015)

Sorry, I totally misread that. In Power Query, again assuming that you have a date which is blank for those rows you don't want, simply filter the date column and unselect the null value.


----------

