The problem is that the substitute value ( here it's 49.33) is not taken into account in the total of the new expression. Instead of 270, I should have 319,33. I know that I can choose the option "Sum of rows". With it, I do have the good result.
My problem is that I need to calculate a new Total quantity with this expression, so this solution does not solve my problem.
I also tried : if($(v_Qty)=0,$(v_Qty)+($(v_Qty_Total)/$(v_NbSalesmen)),$(v_Qty)) but the result is the same
For my new Total Qty, the forum helped me find an expression that works
But you have a field with this data right? so you can work with it, even in that table it is an expression. I just took your data from the excel file. Anyway you can take the expression I sent to you and modify them.
Its difficult to give you a solution with this variables in the middle of expression. I suggest that you try to put your code directly inside the expression in the table and then convert back to variable.
In addition you want to that the result remain as you select some filters. in this case it is necessary to use set analysis.