0% found this document useful (0 votes)
16 views3 pages

Data Preparation in Power BI

The document discusses data preparation in Power BI including joins in SQL and Power Query. It provides examples of different types of joins and how to use custom functions in Power BI using the INVOKE keyword to perform calculations on tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Data Preparation in Power BI

The document discusses data preparation in Power BI including joins in SQL and Power Query. It provides examples of different types of joins and how to use custom functions in Power BI using the INVOKE keyword to perform calculations on tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Trainer Name: Jabivulla Vanalli

Email: [email protected]
Mobile: +91 7829533577

YouTube Channel: Power BI Real-time


Course Duration: 30 Hours

Data Preparation in Power BI:


Joins in SQL or Merge Queries in Power BI:

 Joins in SQL or Merge Queries in Power Query both will give same results.

When Joins Required?

 Suppose we have 2 tables, Table1 contains 1000 records and Table 2 contains 100
records, but we need to prepare report for overall data (Table1+Table2), then will
JOIN the tables based on the TABLE data.

When Joins are possible?

 A JOIN clause is used to combine rows from two or more tables, based on a related
column between them.

Types of JOINS in SQL?

Here are the different types of the JOINs in SQL:

 (INNER) JOIN: Returns records that have matching values in both tables
 LEFT (OUTER) JOIN: Returns all records from the left table, and the matched records
from the right table
 RIGHT (OUTER) JOIN: Returns all records from the right table, and the matched
records from the left table
 FULL (OUTER) JOIN: Returns all records when there is a match in either left or right
table

For more details visit here: https://www.w3schools.com/sql/sql_join.asp

2. Custom Invoke Function in Power BI:

 Write a BLANK Query and we can INVOKE to table.

Example: Employee Table


empno ename job mgr hiredate sal comm deptno
13-06-
7369 SMITH CLERK 7902 800 0 20
1993
15-08-
7499 ALLEN SALESMAN 7698 1600 300 30
1998
26-03-
7521 WARD SALESMAN 7698 1250 500 30
1996
31-10-
7566 JONES MANAGER 7839 2975 20
1995
11-06-
7698 BLAKE MANAGER 7839 2850 30
1992
14-05-
7782 CLARK MANAGER 7839 2450 10
1993
05-03-
7788 SCOTT ANALYST 7566 3000 20
1996
09-06-
7839 KING PRESIDENT 5000 0 10
1990
04-06-
7844 TURNER SALESMAN 7698 1500 0 30
1995
04-06-
7876 ADAMS CLERK 7788 1100 20
1999
23-06-
7900 JAMES CLERK 7698 950 30
2000
21-01-
7934 MILLER CLERK 7782 1300 10
2000
05-12-
7902 FORD ANALYST 7566 3000 20
1997
05-12-
7654 MARTIN SALESMAN 7698 1250 1400 30
1998

 In the above table, employee monthly salary is there. I want to calculate Quarter or
Semester or Yearly salary by using custom INVOKES Function.
 For that we need to write BLANK Query.

Step1:

Query:

= (Salary as number, Months as number)=>Salary*12

Step2:

Select Employee Table, then custom INVOKE function.

You might also like