









Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Prepara i tuoi esami
Studia grazie alle numerose risorse presenti su Docsity
Prepara i tuoi esami con i documenti condivisi da studenti come te su Docsity
Trova i documenti specifici per gli esami della tua università
Preparati con lezioni e prove svolte basate sui programmi universitari!
Rispondi a reali domande d’esame e scopri la tua preparazione
Riassumi i tuoi documenti, fagli domande, convertili in quiz e mappe concettuali
Studia con prove svolte, tesine e consigli utili
Togliti ogni dubbio leggendo le risposte alle domande fatte da altri studenti come te
Esplora i documenti più scaricati per gli argomenti di studio più popolari
Ottieni i punti per scaricare
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
basic knowledge in Excel, Power pivot and Power BI
Tipologia: Appunti
1 / 16
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!










GOAL--> how to turn data into information Excel is not a DATABASE, thus is not a reliable way to store data. Database--> When we talk about a 'TABLE' we mean a collection of columns or a single column, all adjacent to each other. Each column is a 'FIELD' , it must have a name (not an empty space) and this name must be UNIQUE. In excel when we talk about a table we actually mean a RAIN OF CELLS. As excel is not a database, two columns can have the same name. However, this raises errors along the way so we must avoid it. Each column should have a single datatype, could be number, letters. Cust no Product Production plant Order entry Scheduled ship date Actual ship date Unique identifier What the consumer has purchased Where the product has been manufactured When the order was received When we promised to ship May or may not be equal to the scheduled ship date Invoice date Oder quantity Sales AMT Unit price Production serie Document that states the transaction How much Total amount payed Price per unit Product family/group that summarizes different products under the same categorie Each row represents a signle transaction. To highlight an entire column click on the letter (this highlight even the cells not in the table). Once you do this, the count figure on the bottom right tells us how many of these cells are non-empty
mercoledì 10 maggio 2023 17: EXCEL Page 1
We can also test multiple IF CONDITIONS together. If condition 1 is true then add NEG, if it is false then check if condition 2 holds… Tables can be: FACT TABLES--> list of events. It contains the things we want to describe and it is OUT OF these tables that we make our calculations. Usually facts tables have fewer columns as not all characteristics are included, just a key identifier that is linked to a DIMENSION.
Ex: sales tables- event: transaction DIMENSIONS--> list of entities. Ex: customer, product, plant. We look at the data from the fact table from a different prospective/dimension, by focusing on one entity (pivot table). Usually dimension have many columns, each describing a quality of the entity, and fewer rows, as there are no repetition of the same specific entity (on the contrary in the sales table one customer can do multiple orders.) CALENDAR TABLE--> list of dates. By themselves they do not define anything, we must give them a meaning--> date of invoice, shipping… qualities describes in columns could be year, weak, semester. Calendar tables are important because without them we cannot do TIME INTELLIGENCE.
Ex: why is the calendar table useful Now these columns can be used in the pivot table. (americans use FISCAL YEAR--> this is aslo incorporated in the calendar table = FYquarter) What fi I want the suddivision by month? In the sales table I crate the invoice year-month. =YEAR(invoice date)&”-“&MONTH(invoice date). A quicker approach is by using VERTICAL LOOKUP: Check if the column date in the calendar table is a primary key
Vertical look up using the invoice date and the yearmonth column in the calendar table.
EXCEL Page 4
As we said Excel has some limitations: (before we used it as both datasource and analyse)
DATA MODELLING--> done by POWER PIVOT. We connect them into a data model. (calc columns, measures, calc tables, relationship)
martedì 16 maggio 2023 09:
In the pivot table--> add as slicer. This way you can remove the salesarea from the fields in the pivot table Calculated column--> not a native column (already included in the table) RULES:
Now we can create MEASURES To measure the average selling price, first i need to calculate the ratio between the sum of the two columns I can now change the formulas to see the effects. Ex: sales increase by 30% However, this will not change also the average column, because the measure takes the column from the sales table not from the pivot table, Instead of retipyng the cose, I can reuse the measure created before: total sales and total quantity --> METAMEASURE, measure that works on top of other meaasures. Now if we remove the *1,3, averything will readjust.
By creating simply measure, we can create more complex ones by reusing the first ones. For divisions is better to use: DASHBOARD--> if you share it anyone can use it and see the related data. We can also insert a Chart by going on pivot table analyser Product serie--> first two digit of the field product Average sale per transaction--> total sales / number of transactions The number of transactions corresponds to the number of rows in the sales table. To calculate it: Average sale per customer--> total sales / number of customers I cannot count the rows in the customer table (all customers). I want the count of customers that purchase something. Thus, i want the customers in the sales table. However, here we have customers multiple times. I need i DISTINCT COUNT (counts the different customers - not additive = the value at the grand total is not the sum of the subvalues). DAX Formula evaluated in two contexts:
Scalar expression--> anything that turns into a single value (sum, division, average) Ex: How much i invoice in a single day. How much will i loose if i stay close three days? Average revenue per day--> total sales / number of open days How can we estimate the number of days in which we are open?
Ex: relationship between the number of transaction of each area and the total transaction in percentage. --> num of transaction each area / total num of transaction To calculate the total number of transactions, as each row has applied the filter salesarea, we need to use the table function ALL (the output is stricly the same amount of input rows or MORE). In this case it returns the total amount of rows in the table sales. WHAT IF I WANT ALL TRANSACTIONS OF A SUBSET WITHOUT THE SALESAREA FILTER? Now I can do the division and I will have the percentage. NOW WE SWITCH TO POWER BUSINESS INTELLIGENCE It has the same features of excel + SHARING OPTION. Once we dowload it, we have to modify some optins:
The SUM function only accepts one column --> this is because it is not a real DAX function. It is a simpler version of SUMX (scalar function). (x--> explicits to go row by row) Two situations in which we need to explicit SUMX.
AND--> checks several logical condition. First it checks if the age of person 1 is higher than 18. then it will check if the age of the second person meets the condition of being older than 18. It returns TRUE only if ALL its operators are meet the condition. If not it returns FALSE: OR--> checks several logical condition. It returns FALSE only when EVERYTHING is false. If even ONLY ONE condition is tru, it returns true. In excel the number of inputs is not limited In DAX these functions only work with two conditions, we would need to nest(like we did with IF) but the code with be too complex. Thus, we use OPERATORS. Ex of AND: Ex of AND OPERATOR --> && Two conditions:
venerdì 26 maggio 2023 10:
In this case if I use the OR FUNCTION, it will consider the transactions of 2001 no matter the gender, and it will consider the transaction of females no matter the year. Ex of OR OPERATOR--> || The more conditions you add to an OR STATEMENT, the more data you see.
Revenues F or (2001 and germany)--> the customer can be Female or BOTH 2001 AND germany The parentesis are needed to group those conditions
Only when the columns belong to the same table. Ex with gender and english education Classic method with SUMX: OR with calculate: TIME INTELLIGENCE (we put calendarYear in rows) I want to establish the growth from one year to the other. --> (revenues 2002 - 2001) / revenues 2001 --> we need the concept of previous year without explicitly writing it Now I can compute the rate of growth COMULATIVE FUNCTION--> it will add all values up untill that point I CAN MIX THE TWO FUNCTIONS Maybe two compare the YTD of two years I will have a column and for each year it will report the revenues for the previous one Numerator Denominator