Rank of year-to-date (on booking month)

TG Database is a platform for organized data management.
Post Reply
phonedata
Posts: 24
Joined: Mon Dec 23, 2024 3:40 am

Rank of year-to-date (on booking month)

Post by phonedata »

TrimList
This function will take a list of values and remove a certain number of them, or a certain proportion of them. This function is useful for removing outliers from a list.

Finally, we have extended several other expression functions to allow them to take lists as parameters. This is necessary as each cube cell result has to be a single numeric value. When a list of cells is returned from, say, the CubeRange function, we can then calculate a Sum, Mean, Max or Min for example.

Some examples
Let’s now flesh out some of the functions ecuador phone number described in the previous section and explain how they can be used in three different scenarios:


The calculated measure ‘Rank’ can be used to rank a value across a dimension, but this is restricted to specifying all the cells across a given dimension. By using the new expression functionality we can specify a subset of cells on a dimension and rank from that subset.

In this example we use our booking date variable and band it into months. We then want to work out how this month compares to the previous months this year and return this as a rank. Clearly January each year will always have a value of one. February will have a rank of one if it is higher than January, otherwise it will have a value of two. December can only have a rank of 12 if it has the lowest total for the entire year.

The expression to achieve this is shown below. We use the ‘PeriodToDateCubeRange’ function to create the list of values for the year-to-date, and then work out where the current cell is in that ranked list.
Post Reply