Power BI uses DAX for calculations. What is the main reason DAX is preferred over other languages for this?
Think about how Power BI handles data relationships and filtering.
DAX is designed to work with tables and relationships in Power BI. It understands filter context and row context, enabling dynamic and efficient calculations.
Given a Sales table with columns: Product, Region, and SalesAmount, what is the result of this DAX measure when filtered by Region = 'West'?
Sales West = CALCULATE(SUM(Sales[SalesAmount]), Sales[Region] = "West")
Sales table data:
Product | Region | SalesAmount A | West | 100 B | East | 200 C | West | 150 D | North | 50
Sales West = CALCULATE(SUM(Sales[SalesAmount]), Sales[Region] = "West")Add only sales where Region is West.
The measure sums SalesAmount only for rows where Region is West: 100 + 150 = 250.
What error does this DAX measure produce?
Average Sales = AVERAGE(Sales[SalesAmount], Sales[Region] = "East")
Check the syntax of AVERAGE function and how filters are applied.
AVERAGE function takes only one column argument. Filters must be applied using CALCULATE or FILTER functions, not as a second argument.
You want to show how sales change month by month for different product categories. Which visualization type is best suited for this in Power BI?
Think about how to show trends over time clearly.
Line charts are ideal for showing trends over time with multiple categories distinguished by lines.
You have two tables: Customers and Products. Customers can buy multiple products, and products can be bought by multiple customers. How should you model this many-to-many relationship in Power BI?
Think about how to represent many-to-many relationships properly.
A bridge table with CustomerID and ProductID allows Power BI to model many-to-many relationships correctly and enables accurate filtering and aggregation.