Daily Running Notes_Power Query
Daily Running Notes_Power Query
7/25/2022
7/26/2022
7/27/2022
7/28/2022
7/29/2022
8/1/2022
8/2/2022
8/3/2022
Use everyone the same dataset created at cloud
PBI Dataset--> Get Data--> Power BI Dataset--> Choose the dataset
b) We perform operations graphically (More and more), if they are not sufficie
for Coding. Majorly mashup script, minorly R and Python.
c) For each query system generates a script with all the operations p
[sgtarting from reading]
This is visible in Advanced Editor.
Ex: A sample script
Let
Source=Operation,
step1=source+operation,
Step2= Step1+ operation,
---
Laststep=Step2+Operation
In <laststep>
Script Explanation:
a) Each script starts with "let", ends with "in"
b) One step seperated with another step using comma
c) In followed with last step
d) In each step, we take previous step + Current operations
Step[System defined]= Transform[Logical]= Variable [technial]
1) Queries
Remarks Properties:/ managing
/ comments queries
annotations/ [no rows
description: and columns
Wherever dealin
available w
approperiate information, so that
either your team or others when they join they will understand the o
easily.
Note: Queries, Groups, Query, Column, Step etc. all these areas having descri
Move to groups, move up, move down heps to see the queries proper
understanding.
Note: No impact to visuals level
Copy & paste, duplicate, and reference differences:
a) Copy and Paste:
1. Legacy process [MS very popular] 2. Two independent operatio
"an Independent" copy of the query, so we can make our own change
will not take parent changes.
Note: After paste, it will bring all transforms and exact situation of p
b) Duplicate
2. Creates "a[copy + paste]:
dependent" Similar
query, to copyrefers
so always and paste, whereas
to parent it isla
and get
information
3. Dependent query level changes not imposed on parent
Note: If you want to get parent features+ you want to have your feat
for Reference.
a) If the query to be used in the visual and data is required b) If sour
required
Diable Load:
a) The query not required to use as it is having wrong data / in the cu
not required.
Note: Disables object in Italic font at Power query and No show at Po
Query Properties [rows and columns]
a) Individual Query rows and columns
Remove / Keep rows [top, bottom ot required]
Add Columns [ 5 ways]
b) Query with another query rows and columns
Merge: Getting columns from another table in to the main query
condtion
Append: Multiple queries rows appended
Ex: Increment 10 percent TA, 20 percent DA, 30 percent HRA and the
R and Python Coding:
a) Install R or Python in your machine and ensure the paths accessib
environment variables area
b) Go to R and Python, and Write Code
Working on Multiple Queries:
Two ways
a) Combining rows [ Append option in Power Query, Set theory Union
Language]
b) Combining columns [Merge option in Power Query, Joins in SQL La
a) Combining rows [ Append option in Power Query, Set theory Union
Language]
1) Same structured queries you want to append [combine rows]
Note: Number of columns, Order of data types, and column names m
2) If Structure not matching…then system create new columns
Data Types:
Type of data assigned to the column
Advantages:
a) Position at reporting changes [ Numeric and Dates : Right -->Left, Text: Left-->Right]
b) Type of transforms or operations changes[Numeric: Numeric operations, Text: Text Ope
Operations etc.]
Note: Database level data type plays vital role because it controls storage and also many d
View Menu:
Query dependencies: Highly helpful for technical people to understan
dependencies in the Power Query Area.
A) From which we got the queries
B) What all area the functions or parameters used
C) Joined queries etc.
What is parameter?
User specified / choosen value.
Why we require?
Better user interaction
How many types user specify values?
This can also be called as type sof parameters, three types available
a) User Enter Value: ANY PARAMETER
b) User select a value from drop down list of fixed values: LIST PARA
c) User select a value from drop down list of variable values: QUERY
How do we operate?
Two step process
a) Create parameter with type, data type and value
b) Filter where you want user specified data
SQL Server?
Managing tables and other objects is called as DBMS. Multiple types available based on
operations.
A) RDBMS[Relational Database Management System]
B) ORDBMS
C) Simple DBMS
D) Hierarchical DBMS etc.
Note: Relational DBMS is recommended for DWH and Analytics projects since the
relationships lead to good modeling and accurate data
a) Oracle b) SQL Server c) Teradata etc.
a) SQL Server Originated at Sybase Corporation [1987]. Intially it was on Unix
and OS/2.
b) Microsoft Acquired around 1995…later on it is on windows OS.
C) Year of release and database releases are different
SQL Server releases: SQL Server 1987…2016,2017,2019,2022 etc
SQL Server Databases: 1.0.....17.x
a) Instance Required [Server installtion required]
b) Tool required to work with [SSMS, Azure Query Studio, WinSQL, SQL Developer,
TOAD etc.]
c) One Language [T-SQL : Transact SQL ] is required.