Calculations Flashcards

1
Q

T/F

Another word for aggregation is row-level calculation

A

False

They are two different calculations

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

T/F

Aggregation and row-level calculations can appear in the same calculated field.

A

False

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

What are 4 types of calculations?

A

row-level
aggregation
table calculations
LOD expressions

https://www.tableau.com/blog/understanding-how-tableau-calculation-types-work-together

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

What is the order of calculations for the 4 types of calculations?

  • row-level
  • aggregation
  • table calculations
  • LOD expressions
A

row-level & LOD
aggregation
table calculations

https://www.tableau.com/blog/understanding-how-tableau-calculation-types-work-together

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

What calculation type is each formula:

SUM([Revenue])
[Quantity] * [Price]
RUNNING_SUM(SUM([Revenue])

A

Aggregation
Row-Lvl
Table Calculation

Image 1

https://www.tableau.com/blog/understanding-how-tableau-calculation-types-work-together

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

Name the calculation type of each part of this formula:

RUNNING_SUM(SUM([[Quantity] * [Price]])

A

Image 2

https://www.tableau.com/blog/understanding-how-tableau-calculation-types-work-together

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

Are aggregations preformed on columns or rows?

A

Hint:
Agg. examples: SUM(), AVG()

Aggregations are performed on a set of rows (records), grouping them by dimensions specified in the view.

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

Will this formula create a calculation error?

[Distance]/([Activity Date])

A

Yes, you cannot divide a number by a date

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

Will this formula create a calculation error?

[Distance]/COUNTD([Activity Date])

A

Yes, you cannot mix aggregate and non-aggregate arguments

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

What does IIF() do? What’s the correct syntax?

A

IIF(<test>, <then>, <else>, [<unknown>])</unknown></else></then></test>

Unknown is for nulls

IIF ( [Sales] > 10, “OK”, “NOT OK”, “NA” )

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

What is the correct syntax for CASE()?

A

CASE <expression>
WHEN <value1> THEN <then1>
WHEN <value2> THEN <then2>
...
ELSE <>
END <></then2></value2></then1></value1></expression>

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

T/F

All IF() can be written as CASE()

A

False, but all CASE() can be written as IF

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

T/F

To join 2 words end-to-end (e.g. “bat” “man” into “batman”) we would use CONCATENARE()

A

FALSE

there is no CONCATENATE() in Tableau

you would just use +

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

T/F

LOD Expressions are Table Calculations

A

False. These are 2 seperate things.

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

Answer these questions:
Calculations > 3 > Table Calculations fact check

https://campus.datacamp.com/courses/calculations-in-tableau/table-calculations-and-parameters?ex=2

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

How is a Moving Average of 30 calulated?

A

Smooth out noisy data by calculating & plotting the avg of previous entries.

Each point is calculated based on the average of the previous 30 days

17
Q

T/F

A chart presenting a moving avg of 30-days-sales will have less data points than a char with daily sales

A

True

With a moving average, we “smoothen” the graph by reducing the # of data pts thanks to averaging them to one number per window.

18
Q

CAGR ypically compares the values over a period [longer/shorter] than one year horizon, indexing avg growth in n years to the 1st year.

19
Q

T/F

Moving calculations require RUNNING family of functions & may use WINDOW functions in a secondary calculation.

A

False,

moving calculations require “bucketing” time intervals into windows anchored to a point in time, so they rely heavily on the WINDOW family of functions.

20
Q

Comparing results per discrete month across various years is a ____ comparison.

A

year-over-year

21
Q

T/F

This is a year-over-year comparison chart

Image 3

22
Q

____ preforms a running calculation (e.g. SUM), restarting each year.

Hint: It’s a Quick Table Calculation

A

Year-to-Date (YTD)

23
Q

What does CAGR stand for?

A

Compound Annual Growth Rate

24
Q

What is an example of a CAGR?

5 or 5%

25
Q

What does the CAGR mean in this chart?

Image 4

A

In 2021, we observed a 32% avg compound annual growth rate over the previous 3 years, mainly driven by the spike in the last year

26
Q

T/F

CAGR cannot be negative

27
Q

[……….] calculations are used to see long-term trends.

  1. CAGR
  2. Moving
  3. YTD
A

Moving

Used for smoothing fluctuations in data

Handy when there are a lot of data points and a regular calculation wouldn’t give much insight.

28
Q

List all of the Quick Calculations

Hint: 11
5 groups

A

Running Total
Percent Total

Difference
Percent Difference

Rank
Percentile

Moving Average

YTD Total
Compound Growth Rate
Year Over Year Growth
YTD Growth

29
Q

Create outline of an IF statement

A

If ___ THEN ___

ELSEIF ____ THEN ___

ELSE ___

END

30
Q

Birth Year should be [dimension/measure]

31
Q

Lat & Long should be [dimension/measure]

32
Q

Bins are [discrete/continuous]

33
Q

Time series are [discrete/continuous]

A

continuous

34
Q

T/F

All CASE() can be written as IF()