Use DAX time intelligence functions in Power BI Desktop models Flashcards

1
Q

What is time intelligence in Power BI?

A

Time intelligence involves calculations over dates, months, quarters, or years to analyze data over time.

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

How does DAX handle time intelligence?

A

DAX modifies the filter context for date filters to calculate metrics like year-to-date (YTD) revenue.

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

Give an example of a time intelligence calculation.

A

Calculating the year-to-date revenue by adjusting the filter context to include all dates from the start of the year to the current date.

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

What are some questions that time intelligence calculations can help answer?

A

What is the accumulation of revenue for the year, quarter, or month?

What revenue was produced for the same period last year?

What is the revenue growth over the same period last year?

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

What is the purpose of DAX time intelligence functions in Power BI?

A

To simplify the task of modifying date filter context for calculations over standard date periods like years, quarters, and months.

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

What is a requirement for using time intelligence DAX functions?

A

Having a date table in your model that contains unique, non-BLANK dates and spans full years.

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

What does the TOTALYTD function do in DAX?

A

Evaluates an expression for year-to-date (YTD) in the current filter context.

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

How do you calculate year-to-date revenue using DAX?

A

Revenue YTD = TOTALYTD([Revenue], ‘Date’[Date], “6-30”)

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

What does the SAMEPERIODLASTYEAR function do in DAX?

A

Returns a table of dates shifted one year back in time from the current filter context.

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

How do you create a measure to calculate revenue for the prior year in DAX?

A

Revenue PY = CALCULATE([Revenue], SAMEPERIODLASTYEAR(‘Date’[Date]))

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

What do the FIRSTDATE and LASTDATE DAX functions return?

A

The first and last date in the current filter context for the specified column of dates.

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

How do you calculate the number of new customers in a time period?

A

By creating a measure that subtracts the count of distinct customers before the period from the count life-to-date (LTD).

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

What is a common use of snapshot calculations in DAX?

A

To summarize values like inventory stock levels, ensuring you only sum across dimensions other than date.

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

How can you calculate stock on hand for a single date using DAX?

A

Using the LASTDATE function to filter the SUM of UnitsBalance.

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

What function can be used to handle missing dates in snapshot calculations?

A

The LASTNONBLANK function, which finds the last date with a non-blank value.

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