Formula troubles Part 2

Hello again Panorama friends,
You have been very helpful with by first request. It worked just fine. My remaining problem is getting two different results to give a total amount.
The first formula gives the correct total amount of 873,600 by using the multiplier of 10400 : {PATTERN(10400*(VAL(«TK»)+VAL(«K»)+VAL(«1»)+VAL(«2»)+VAL(«3»)+VAL(«4»)+VAL(«5»)),"#,.##")}
The second formula gives the correct total amount of 640,360 by using the multiplier of 11435: {PATTERN(11435*(VAL(«6»)+VAL(«7»)+VAL(«8»)),"#,.##")}

I want to display the total of the first formula plus the amount of the second formula such as $1,513,960

You need to realize that the first argument of the pattern( function as a number. In the first formula it is 10400*(VAL(«TK»)+VAL(«K»)+VAL(«1»)+VAL(«2»)+VAL(«3»)+VAL(«4»)+VAL(«5»)), in the second, it is 11435*(VAL(«6»)+VAL(«7»)+VAL(«8»)). Simply add those together, and plug the sum into the first argument of the pattern( function.

As Bruce says, you need to combine both formulas into a single pattern( function which can be a little hairy trying to keep track of all the parentheses involved. I think this might be what you need:

{Pattern((10400*(VAL(«TK»)+VAL(«K»)+VAL(«1»)+VAL(«2»)+VAL(«3»)+VAL(«4»)+VAL(«5»)))+(11435*(VAL(«6»)+VAL(«7»)+VAL(«8»))),"#,.##")}

Thanks Gary. That worked just the way I wanted. I was try to add the two figures and it was a disaster. You are exactly correct trying to keep track of the right amount of parentheses. As always thanks for your help.

The parentheses around the two summands are redundant.
a*(b+c+d)+e*(f+g+h) works just fine. Multiplication comes first, and then addition. This is why you need the parentheses where they are: a*b+c+d only multiplies a times b, and then adds c and d, so you need the parentheses to add b+c+d first. e is multiplied time f+g+h because of the parentheses, but since multiplication comes before the addition, you do not need parentheses around the product. But it does not hurt to have them. a*(b+c+d)+e*(f+g+h)=(a*(b+c+d))+(e*(f+g+h))

The italics are from the strange markup that this page uses.

That “strange markup” is called Markdown, it is by far the most widely used document markup language. According to Wikipedia, “Implementations of Markdown are available for over a dozen programming languages” and “Markdown plugins exist for every major blogging platform”.

Markdown is also used for all Panorama X documentation.

Markdown has special features for including source code in a document. Probably the easiest method is to simply indent the code by 4 spaces. When you do that, special characters like asterisks are not converted to formatting, but displayed as-is, like this.

3*4+5

You can also embed code or formulas by enclosing it in back-ticks, for example 3*4+5 or x*y^2. Without the backticks, this would display as: 34+5 or xy^2, not good, obviously.

Markdown is super easy and with about 5 minutes learning you’ll find it second nature. When I was looking for a discussion platform for Panorama X the fact that Discourse uses Markdown was a huge plus in my evaluation.