You need to create a parameter to allow the user to select profit, breakeven, loss or ALL and a calculated field used to filter the data. The calculated item is as follows:
WHEN 'Profit' THEN IF SUM([Profit]) > 0 THEN 1 ELSE 0 END
WHEN 'Loss' THEN IF SUM([Profit]) < 0 THEN 1 ELSE 0 END
WHEN 'Breakeven' THEN IF SUM([Profit]) = 0 THEN 1 ELSE 0 END
WHEN 'ALL' THEN 1
This is placed on the filter shelf and set filter value to 1. The parameter [Profit?] has the four values shown in this calculated item. You also need to have profit on the worksheet. I have attached an example.
Note: you can use this method to filter on multiple field at once. Ue the CASE statement to select teh parameter and the IF logic to perform the required filtering.
Filter on Profit.twbx.zip 1.1 MB