Pbi L2
Pbi L2
Question: How would you handle complex calculations or custom business logic in
Power BI?
Answer: Power BI provides several options for handling complex calculations or
custom business logic:
DAX (Data Analysis Expressions): Use DAX functions and formulas to create
calculated columns, measures, and complex calculations within the data model.
Power Query Editor: Utilize Power Query's advanced transformations and custom
functions to perform data cleansing, merging, and complex transformations before
loading the data into the model.
Custom visuals: If the built-in visuals don't meet your requirements, you can use
custom visuals created with JavaScript or TypeScript to implement custom business
logic or calculations.
Question: What are the differences between calculated columns and measures in Power
BI?
Answer: The main differences between calculated columns and measures in Power BI
are as follows:
Calculated columns: These are columns added to a table within the data model, and
their values are computed during data loading or refreshing. Calculated columns are
useful when the calculation result is needed at the row level and doesn't change
with filtering or aggregation.
Measures: Measures are calculations performed on the fly based on the user's
interactions with the report or dashboard. They are defined using DAX expressions
and can dynamically adjust their results based on filtering, slicing, or
aggregating the data. Measures are typically used for aggregations, sums, averages,
and other calculations that depend on the context of the report.
Question: How can you implement row-level security (RLS) in Power BI?
Answer: To implement row-level security in Power BI, follow these steps:
Define roles: Create roles that represent different user groups or security levels.
Set up filters: Define filters on tables or columns within the data model based on
the roles. These filters determine which data each role can access.
Assign users to roles: Assign individual users or Active Directory groups to the
appropriate roles.
Test and validate: Verify that the row-level security is applied correctly by
testing the report or dashboard with different user roles and checking the data
visibility.
Question: What techniques can you use to improve the data refresh performance in
Power BI?
Answer: To improve data refresh performance in Power BI, consider the following
techniques:
Use DirectQuery or Live Connection: Instead of importing data into Power BI, you
can connect directly to the data source or establish a live connection to leverage
real-time data.
Optimize data source queries: Optimize the SQL queries or queries sent to the data
source by removing unnecessary joins, applying appropriate filters, and using query
folding.
Enable incremental refresh: If your dataset has a large amount of data, enable
incremental refresh to refresh only the newly added or modified data instead of
refreshing the entire dataset.
Schedule refresh during off-peak hours: Schedule the data refresh during off-peak
hours to avoid performance degradation caused by high usage or