I have a table that has a bunch of =SUM()/CALCULATE Calculated Fields. Items like:
etc. for the usual financial metrics
I created a pivot table to list to provide Top 10 reports by Business Segment. I get results for one segment like below when I sort on Margin:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Total Volume YTD[/TD]
[TD]Total Margin YTD[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]250[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]123[/TD]
[TD]300[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]0[/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]100[/TD]
[TD]-100[/TD]
[/TR]
</tbody>[/TABLE]
What I would like to do is to remove all rows from the table where volume is 0 (so only customers A,B, and E remain). To test this I tried using FILTER() in the Total Volume to just eliminate everything less than 0 to start with:
But I get this result of just getting a blank instead of losing the line:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Total Volume YTD[/TD]
[TD]Total Margin YTD[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]250[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]123[/TD]
[TD]300[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD][/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]100[/TD]
[TD]-100[/TD]
[/TR]
</tbody>[/TABLE]
What is the best way to omit results from a Pivot Table based on excluding items according to one column?
Bonus question: Should I wrap my SUM() items in a CALCULATE()?
Code:
Total Gallons:=SUM(MasterData[Net Quantity in GAL])
Code:
Total Gallons YTD:=CALCULATE ( [Total Gallons], DATESYTD ( MonthOnlyDateTable[Date] ) )
etc. for the usual financial metrics
I created a pivot table to list to provide Top 10 reports by Business Segment. I get results for one segment like below when I sort on Margin:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Total Volume YTD[/TD]
[TD]Total Margin YTD[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]250[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]123[/TD]
[TD]300[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]0[/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]100[/TD]
[TD]-100[/TD]
[/TR]
</tbody>[/TABLE]
What I would like to do is to remove all rows from the table where volume is 0 (so only customers A,B, and E remain). To test this I tried using FILTER() in the Total Volume to just eliminate everything less than 0 to start with:
Code:
Total Volume YTD:=CALCULATE ( [Total Gallons], DATESYTD ( MonthOnlyDateTable[Date] ) , FILTER(MyTable[Total Volume YTD]<0))
But I get this result of just getting a blank instead of losing the line:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer[/TD]
[TD]Total Volume YTD[/TD]
[TD]Total Margin YTD[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]250[/TD]
[TD]1000[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]123[/TD]
[TD]300[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD][/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]100[/TD]
[TD]-100[/TD]
[/TR]
</tbody>[/TABLE]
What is the best way to omit results from a Pivot Table based on excluding items according to one column?
Bonus question: Should I wrap my SUM() items in a CALCULATE()?