DAX - Tables Flashcards

1
Q

How can you include columns from another table to iterate over?

A

You must use RELATED or RELATEDTABLE functions to bring the data into the table you want to iterate over

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

SUMMARIZE syntax

A

SUMMARIZE(TableName, GroupByColumn1, GroupByColumn2, GroupByColumn…, Name1, Expression1, Name2, Expression2…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

SUMMARIZE example

A

SUMMARIZE(
Sales, //Table
DateTime[CalendarYear], //Group By 1, ProductCategory[ProductCategoryName],
//Group By 2,
“Sales Amount”, //Name1
SUM(Sales[SalesAmount]), //Expression1
“Discount Amount (USD)”, //Name2
SUM(Sales[DiscountAmount]) //Expression2
)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does the SUMMARIZE function work?

A

It creates a summary table by grouping data based on one or more columns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you clone a table using DAX?

A

ClonedTableName=ALL(Original_Table_Name)

Example
Sales Data=ALL (Sales)

Writing a long sentence to left justify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why would you want to clone a table?

A

To perform manipulation or analysis on data while preserving the original records.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the cloned table inherit?

A

The cloned table inherits the Original table’s:
- Columns
- Data
- Relationiships

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the difference between a cloned table and a calculated table?

A

Cloned Tables
Simple duplicates of the original table

Calculated tables created based on
- Calculations
- Transformations
- Aggregations

For example, you could create a calculated table showing each bicycle model’s total sales by year

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Best practices when creating calculated tables

A
  • Optimize DAX calculations
    Complex calculations slow down model performance
  • Use variables to enhance formula readability. Variables are recommended whenever you have a complex expression.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly