From here on out, we will be using DACS to create new columns, measures and generally extend our power
pivot capabilities.
Now, before you get too scared and jump ship, because maybe you're not a programmer, while DACS may
be a language if you've ever written and an Excel formula, then you've basically written DACS.
Now that stands for data analysis expression's.
Basically, it's really just a fancy name for formulas.
It doesn't consist of big long text files with crazy object oriented stuff like you might have to do
with C Sharp.
And it's not a scripting language like VPA or Ruby.
I mean, I guess technically there's something to it behind the scenes.
But for what you and I will be doing, it's just formulas.
Some of the formulas will be longer than others and the formulas can be written more nicely than Excel
formulas with spacing in the dense and such so that they're more readable.
But at the end of the day, we're just talking about Excel formulas with a few different rules involved.
So to start, let's discuss some basic concepts here in Excel.
DACs, just like Excel, supports common arithmetic formulas like plus minus times and so on.
So on a formula we can write something like equals five times two to get the value ten.
Now a large portion of DACs will involve using functions.
Most of it, in fact, functions consist of the name of the function, such as if followed immediately
by a parentheses with no space.
This is called opening the function.
Once you've opened the function, you can pass information in through parameters.
Functions can have a fixed number of parameters, such as our function, which has three with the specific
order and specific requirements for each.
Some other functions will have optional or even an unending parameters list.
A good example of this in Excel is the sum function we can at any number of inputs to the sum function
to total them all together.
We can add a list, sells individual cells, fixed numbers and on and on.
Now, optional parameters are those parameters that can be included or excluded to modify the outcome
of a function.
These are typically denoted with square brackets around the parameter name.
So, for example, if we look at the V look up function, there are three required inputs and then one
optional input.
At the end, optional inputs for functions will always occur at the end of the parameter list.
Some functions will allow for the use of an unending pattern of inputs.
The sothis function is a good example.
The function takes one input that's required and then pairs of inputs together until you've provided
enough inputs to solve your problem, so you'd have to put in three, five, seven, nine and on and
on combinations of parameters to use the Sonmez function where each one is a pattern of a range, followed
by a criteria.
DACs functions will follow these same types of rules and details.
For the most part, they use essentially the same syntax.
Many of the function names will even match cells function names.
Really, if you have any experience with Excel formulas, you should pick up DACs very quickly.
But if not, we'll be working from the ground up within Daks and you'll learn along the way.