O que são medidas?
These are numeric values that represent the data set and the status of a business indicator associated with the dimensions. Ex: sales value, quantity of item in stock, profit percentage, etc. It is also important to understand about granularity. Depending on its level, we have more detailed data. We will explain more about it in the "Sum" type.
Quais são os tipos de medidas?
In BIMachine we have 5 types of measures: sum, count, minimum, maximum, average and distinct count. Below we will see examples of how they work.
Sum
It serves to add up the values.
We can see that in the "Total" column we have a granularity divided into three parts. In the row "All products" next to "All customers", we can see that it is adding up the total of all product values together. In the column "All products" next to "Atletico", it is adding up the value of all the products of the Atletico establishment only. And the values next to the products show the unit value of each product. Thus, it decreases the granularity, increasing the level of information. Learn more about granularity by clicking here.
Count
It is used to count the quantity. In this case, it counts how many items each product has.
Minimum
Minimum value of a column. In the example, it takes the minimum price of the products.
Maximum
Maximum value of a column. In this case, analyzing the maximum price of the products.
Average
An analytical mean is not the same as the mean we have learned (sum of all the values in a set divided by the number of elements in those sets). The analytical mean is calculated by lines, let’s look at an example:
If we add up the price of the products in Dunder’s establishment, 500 + 80 + 300 + 300 the result will be 1180. If we divide 1180 by 4, which is the quantity of products, it will give 295, but looking at the result that the analysis brings is 260.
Why is this?
Because in analytics, the average is calculated by rows.
If we calculate the rows of the "Total" column, 500 + 160 + 600 + 300 and divide by 6 which is the total product count of the Dunder establishment ("__Fact_Count" column), we will see that it will give 260, closing the correct result. This average is calculated this way because the weight of one sale is not equal to the weight of another sale. Ex: if we compare 2 sales of $ 200.00 and 8 of $ 50.00, the final value will be the same. But, the sale of 2 items of $ 200.00 will bring the average up, unlike the 8 items of $ 50.00 that will bring the average down.
Separate count
It is used to count values that are not repeated. In our example, if the Athletic establishment had bought 2 printers, only 1 printer would be counted, because the count is by distinct column values and not by quantity of items.