You can make the current formula of totals or the style of line counting according to the data of the report itself. If you need to distinguish between table A and B data, you can insert a constant into select statements (do you mean join or join?), And then enter the formula in this field.
source share