Power Bi
Power Bi
split are components used in data integration or ETL (Extract, Transform, Load)
processes.
• Multicast: It is used to split a data flow into multiple identical copies. Each
copy is an independent branch of the data flow and can be processed
separately.
• Conditional Split: It is used to divide a data flow into different branches based
on specified conditions. Each branch can have its own set of conditions and
processing logic.
Q3 - Difference between CTE (Common Table Expression) and Temp Table: CTE and
Temp Table are used to store temporary results within a query or a session.
• CTE: It is a named temporary result set that can be referenced within a SELECT,
INSERT, UPDATE, or DELETE statement. It exists only for the duration of the
query and is typically used for complex queries to improve readability and
maintainability.
• Temp Table: It is a temporary table stored in the tempdb database. It can be
created and used like a regular table within a session. Temp tables persist until
they are explicitly dropped or until the session ends.
Q4 - Difference between UNION and MERGE: UNION and MERGE are used in SQL to
combine or merge data from multiple tables.
• UNION: It combines the result sets of two or more SELECT statements into a
single result set, eliminating duplicates by default.
• MERGE: It is used to perform insert, update, or delete operations on a target
table based on the data from a source table. It allows you to synchronize data
between two tables based on specified conditions.
Q5 - What is an index: An index is a database structure that improves the speed of
data retrieval operations on database tables. It is created on one or more columns of
a table and allows the database engine to quickly locate and access the data based
on the indexed columns. Indexes can significantly improve query performance.
Q6 - Difference between UNION and UNION ALL: UNION and UNION ALL are used
to combine data from multiple SELECT statements in SQL.
• UNION: It combines the result sets of two or more SELECT statements into a
single result set, eliminating duplicates from the final result.
• UNION ALL: It also combines the result sets of multiple SELECT statements
into a single result set, but it does not remove duplicates. It includes all rows
from all SELECT statements, even if they are duplicates.
Q7 - Where is an index used: Indexes are used in databases to speed up the retrieval
of data. They are primarily used in database tables where there are frequent search
operations, such as SELECT statements with WHERE clauses. By creating indexes on
columns used in search conditions, the database engine can quickly locate the
required data, reducing the need for full table scans and improving query
performance.
SELECT column1, column2, ... FROM table GROUP BY column1, column2, ... HAVING
COUNT(*) > 1;
This query groups the rows based on the specified columns and then filters out the
groups that have more than one occurrence, indicating the presence of duplicate
records.
• Row-Level Security (RLS) is a feature that allows you to restrict access to rows
within database tables based on user permissions or conditions defined by a
security policy. RLS ensures that users can only access the data that they are
authorized to see, based on the attributes of the rows. It provides an
additional layer of security and helps enforce data privacy and confidentiality.
• Time intelligence refers to the ability to analyze and visualize data over
different time periods or time-related dimensions in Power BI. It involves
performing calculations and comparisons based on dates, such as year-to-
date, quarter-to-date, or period-over-period comparisons. Time intelligence
functions and features in Power BI enable users to gain insights into trends,
patterns, and performance metrics over time.
• The term "variable index" is not commonly used in the context of databases or
indexing. However, if you meant a clustered index or a non-clustered index,
their benefits include:
• Improved query performance: Indexes allow the database engine to
quickly locate and retrieve data, reducing the need for full table scans.
• Efficient data retrieval: Indexes enable data to be accessed in a sorted
or filtered manner, optimizing search operations.
• Reduced disk I/O: Indexes store a subset of data, allowing the database
engine to read fewer disk blocks when fetching data.
• Enhanced data integrity: Indexes can enforce unique constraints and
ensure data consistency.
Q15 - What is the difference between RANK and ROW_NUMBER: In SQL or Power BI,
RANK and ROW_NUMBER are window functions used to assign a sequential number
to each row within a result set or a partition.
• RANK: The RANK function assigns a unique rank to each row based on a
specified column or expression. Rows with the same values receive the same
rank, and the subsequent rank is skipped. For example, if two rows have the
highest sales, they both receive rank 1, and the next row receives rank 3.
• ROW_NUMBER: The ROW_NUMBER function assigns a unique number to each
row in the result set, regardless of any ties or duplicate values. Each row is
assigned a distinct sequential number based on the order specified in the
query. For example, the first row receives number 1, the second row receives
number 2, and so on.
• FILTER and FILTER ALL are DAX functions used in Power BI for filtering data.
• FILTER: The FILTER function filters a table or a table expression based on
specified conditions or criteria. It returns a new table that includes only the
rows that meet the specified filter conditions.
• FILTER ALL: The FILTER ALL function also filters a table or table expression, but
it removes any existing filters on the columns included in the function. It
returns a new table that includes all the rows from the original table,
regardless of any existing filters.
• COUNT and COUNTX are aggregation functions used in Power BI to count the
number of rows or records in a table or table expression.
• COUNT: The COUNT function returns the number of rows that contain non-
blank values in a specified column or expression. It does not include rows with
blank or null values in the count.
• COUNTX: The COUNTX function counts the number of rows that result from
evaluating an expression or calculation for each row in a table or table
expression. It considers both non-blank and blank values, providing a count of
all rows returned by the expression.
Please note that the availability of specific data sources may depend on the version
and licensing of Power BI you are using.