Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to make an equation within QV in the load statement. We are attempting to figure out our margin by using a 50/50 split between our sales reps. The equation is fairly simple but I am fairly new at QV.
IF(salesrep_id = 3208, 3207 THEN [MARGIN/2])
So in words. If the salesrep_id (field name in DB) is equal to 3208 or any of our sales rep IDs then divide the margin (calculated field name) in half.
Thanks for any help.
Try this:
IF(salesrep_id = 3208 OR salesrep_id = 3208, MARGIN/2,0)
nor
IF(salesrep_id = 3208, MARGIN/2, IF (salesrep_id = 3208, MARGIN/2,0),0)
Good luck!!!
Try this:
IF(salesrep_id = 3208 OR salesrep_id = 3208, MARGIN/2,0)
nor
IF(salesrep_id = 3208, MARGIN/2, IF (salesrep_id = 3208, MARGIN/2,0),0)
Good luck!!!
My issue now is the field name Margin and field name salesrep_id are stored in two separate tables. Combining the two tables leads to an in efficient application.
So thus I could use a variable?
Variable name: split
Value: IF(salesrep_id = 3208 OR salesrep_id = 3219, MARGIN/2,0)
Then if I make a text box with a condition: =sum(spilt) it should give me a value. Currently it gives me a value of zero.
Any other ideas on how to do this if I do not want to this in the load.
Thanks.
So if you place this just in the text box it works.
=sum(IF(salesrep_id = 3208 OR salesrep_id = 3219, Margin/2,0))
What a neat application...
this way works too
=sum(IF(match(salesrep_id,3208,3219), Margin/2,0))
rgds