We had a question come in to support about suppressing rows based on data conditions. This is how you do it.
ReportWORQ has a RWSUPPRESS formula which can accomplish this. The formula is documented here: https://docs.reportworq.com/docs/excel-functions#rwsuppress .
Place the formula in a cell on the row(s) that you want to be hidden or deleted. The first parameter to the formula is a condition that should evaluate to TRUE if you want the row suppressed and FALSE if you want to keep it. The remaining parameters indicate if you want the row hidden or deleted and if the formula should act on rows or columns.
Referencing the above example you can see the RWSUPPRESS formula in A7 is using the formula SUMSQ to determine if the sum of the squares of the data for New Jersey equals 0. If it does then that row will be deleted.
Why SUMSQ and not SUM? Because if Q1 was -20 and Q2 was 20 then the SUM would be 0 and this row would be deleted when there actually is data. Squares are always positive so that type of compensating error can’t happen with SUMSQ. Best Practice
Why delete rows instead of hiding them? If you’re exporting to a PDF file then hide the rows, it’s faster and will produce the same result as deleting. If you’re exporting to Excel then you probably want to Delete the rows so that they are no longer in the file and the user can’t drill to them. This is helpful when you’re using the Grouping feature in Excel. Grouping hides and shows rows, so if you collapse and expand a group the Zero rows will appear again. Using the Delete feature will remove the rows so that they won’t appear if a group is expanded.
Why does the formula say #NAME? ? Because the proprietary ReportWORQ formulas are not known to Excel. So, when you look at them in Excel they will appear to be in an error state. Don’t worry, when you run the report through ReportWORQ it will know what to do with them. Feel free to hide the column that these formulas are in so that the #NAME? is not visible.
And of course everything above applies to columns too.
Thanks,
-Andy