Hi,
The syntax of lookup function should be like this:
=Lookup(source_expression, destination_expression, result_expression, dataset)
And aggregate functions cannot be used for the destination or result Expression parameter of a lookup function.
In your second try, it should be like this:
=lookup(fields!branch.value, fields!branch.value, fields!sales.value, "dataset2")
If you want to sum the sales, you may try like:
=sum(cdbl(lookup(fields!branch.value, fields!branch.value, fields!sales.value, "dataset2")))
For your reference: