I suggest you do the QlikView training and read some help files. But...
For your first expression:
Sum(Sales) ** This is the basic calculation being performed.
The other text is what is called Set Analysis. They specify which 'sets' of data to calculate on:
Year = {$(vCurrentYear)} ** where Year field is equal to the value returned by the variable vCurrentYear
TransactionsNberofDay = {"<=$(vCurrentDayNber)"} ** where TransactionsNberofDay field is equal to or less than the value returned by the variable vCurrentDayNber
In the other expression that you gave:
Year = {$(vCurrentYear), $(=(vCurrentYear)-1)} ** where Year field is equal to the value returned by the variable vCurrentYear or the year previous to vCurrentYear
Quarter = Month = Week =
** These statements tell the expression to ignore any selections made in those fields.
Go to Settings > Variable Overview to see how the variables are being calculated.