Hi Peter,
Based on my understanding, you want to create a filtered dataset to return different data based on parameter selection, right?
In your scenario, if the Customer is a variable, it will create a report parameter dynamically in the report. You need to specify values for the parameter(like Peter). The query should be written in dataset like below:
IF @Customer = 'Peter' Then
Searchargument = Username
ELSE
Searchargument = Company
END
For more information, please refer to this article:
Building Reports With Dynamic Datasets.
Besides, we can also add a dataset filter condition. The condition should look like below:
Expression: Fields!searchargument.value
Operator: =
Value: IIf(Fields!Customer.value = "Peter", Username, company)
If the method posted above doesnt meet your requirement, please share some sample data and report design for our analysis. Also please provide expected results.
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu