Hi i have a prompt prameter ?TypeofExpense? . I have another dataitem costofExpense .
Now if ?TypeofExpense?= 'all' then costofExpense should give me cost for TypeofExpense='rent' else costofExpense for choosen TypeofExpense
As i have another dataitems (costs) also..i dont want to apply the filter for those data items
There is a way to do this although selecting 'All' from the prompt and showing values for 'rent' is not a bright idea ! You can add a static value to the Prompt for 'Rent'.
With what you have, you can use a Case statement in the data item costofExpense.
Case
When ( ?TypeofExpense? = 'All' and [TypeofExpense] = 'rent' )
Then ( costofExpense )
Else ( 0 )
End
This presumes that [TypeofExpense] and [costofExpense] are two data items in the same query and the values of both will be present in each row.
Filters apply to queries, not data items.
Please provide sample inputs and desired outputs.