Write DAX formulas for Power BI Desktop models Flashcards
What types of calculations can you add to your semantic model using DAX in Power BI?
Calculated tables, calculated columns, and measures.
What is a calculated table in Power BI?
A table created using a DAX formula to duplicate, transform, or generate new data, which is imported into the model and increases storage size.
What is the primary function of a calculated column in Power BI?
To add a column to any table with a DAX formula that evaluates for each row, increasing storage size and evaluated at data refresh for Import mode tables or at query time for DirectQuery tables.
How are measures different from calculated columns in Power BI?
Measures are concerned with summarization, evaluated at query time, and their results are not stored in the model. They are identified with a calculator icon in the Fields pane.
What is a role-playing dimension in Power BI?
A dimension table that plays multiple roles in a model, such as a Date table relating to multiple date columns in another table, using active and inactive relationships.
What is the purpose of What-if parameters in Power BI?
To allow users to select or filter by values in a calculated table, enabling hypothetical analysis without the calculated table propagating filters.
What is the general structure for creating a model calculation in DAX?
<Calculation> = <DAX>
</DAX></Calculation>
What are the main elements used to assemble DAX formulas?
DAX functions, DAX operators, references to model objects, constant values, DAX variables, and whitespace.
What is IntelliSense in Power BI Desktop?
A code-completion aid that lists functions and model resources, helping quickly build accurate formulas.
What must follow function names in DAX formulas?
Parentheses, where variables are passed in.
How should column references be formatted in DAX formulas?
Enclosed within square brackets and optionally preceded by the table name for clarity.
How should measure references be formatted in DAX formulas?
Enclosed within square brackets, and it’s recommended not to precede them with the table name.
What role does whitespace play in DAX formulas?
It helps format the formulas for readability and troubleshooting, without affecting logic or performance.
How can you format a measure for better readability in DAX?
By using spaces, tabs, and carriage returns to structure the formula clearly.
What are the model data types in Power BI?
Whole number, decimal number, boolean, text, date, currency, and BLANK.