Forum Discussion
How to exclude an entry from visualisation table if both fields are showing zeros
- 5 years ago
Anonymous
Thanks for the sample data. It makes things much easier.
Seeing the dataset, the data contains rows which, when grouped by the IDs, sum out to 0, This means that filter expressions referenced to row value <> 0 wil still return these rows (they have values but their aggregated sum is 0). Here is an example:
If you want to exclude these rows since they sum to 0, use the following measure instead to filter the visual in the filter pane (set the value to "is greater or equal to 1")
Exclude Sum to 0 rows = VAR Summ = //This creates a virtual table summarizing the measures by the IDs/fields included SUMMARIZE ( Table1, Table1[Project ID], Table1[Sub-Project ID], Table1[Chart of Accounts], Table1[Project Manager ID], Table1[Line Type], "Fixed", [Sum Fixed Costs], "Variable", [Sum Variable Cost] ) RETURN //The measure filters the virtual table to count rows containing "ACTUAL" and with summarized values which are not 0 COUNTROWS ( FILTER ( Summ, Table1[Line Type] = "ACTUAL" && OR ( [Fixed] <> 0, [Variable] <> 0 ) ) )and you will get this result
Anonymous
If both Variable and Fixed cost are zero then, the grand totals for these fields will stay the same regards of the filter.
Are you referring to any other columns other than these where you have grand totals?
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
hi Fowmy
the grand totals that i'm referring to are the grand totals of the 2 fields in visualisation table. so meaning, if originally before any changes, the variable cost grand total should be 3000 while fixed cost grand total should be 8000 based on above example. this is a control check as to whether the suggestion works. but when i use the filter pane "variable cost is not zero" and "fixed cost is not zero", the grand total changed to a lesser amount. so it is indicating that this suggestion eliminated some lines that should not have been eliminated.