Plan and Implement Calculations in Tableau Desktop - 38% Flashcards

1
Q

what is fixed LOD and when to use

A

This expression computes values using the specified dimensions without reference to any other dimensions in the view.

use when: aggregates the value only at the dimensions which are specified by the user in the calculation

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

what is include LOD and when to use

A

This level of detail expressions compute values using the specified dimensions in addition to whatever dimensions are in the view.

use when a user wants to calculate values at the lower level of granularity and then aggregate and show the values at the higher level of granularity

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

what is exclude LOD and when to use

A

These levels of detail expressions subtract dimensions from the view level of detail.

use when you want to omit specified dimensions from the aggregations

although in the view we are going to show only “Segment” in calculations we need to include “Customer Name” as well so that average customer sales can be calculated.

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

what are LOD expressions

A

used to run complex queries involving many dimensions at the data source level instead of bringing all the data to Tableau interface

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

example of INCLUDE

A

compare the average customer sales across different product segments

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

example of EXCLUDE

A

compare total sales with the monthly sales of the East region

To get the monthly sales we need to have “Region”, “Month” and “Sum of Sales” in the view. But, now to get the total sales of Region, we need to exclude “Month” in the calculation so that we can have total sales value for the region.

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

example of FIXED

A

calculates the sales across regions

even if a user puts another field say “State” in the view, the fixed calculation still calculates the value at region level only

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

ABS

A

returns the absolute value of the specified number.

Example: ABS(-10) = 10

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

CEILING

A

rounds the given number to the nearest integer of equal or greater value.

Example: CEILING(5.1265) = 6

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

FLOOR

A

rounds the given number to the nearest integer of equal or lesser value

Example: FLOOR(5.1265) = 5

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

LOG

A

returns the logarithm value of the number for the given base. If the base value is omitted, base 10 is being used by default

Example: LOG(100) = 2, LOG(256,2) = 8

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

MIN

A

Returns the minimum value of an expression across all records

Example: MIN([Profit])

This expression will return the minimum value of the profit across all the profit values

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

MAX

A

Returns the maximum value of an expression across all records

Example: MAX([Profit])

This expression will return the maximum value of the profit across all the profit values

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

POWER

A

It returns the result of a number raised to the given power

Example: POWER(5,2) = 25

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

SQRT

A

It returns the square root of a given number

Example: SQRT(25) = 5

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

ZN

A

“ZN” stands for “Zero if Null”. It means it returns the given expression if it is not null, otherwise returns zero.

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

CONTAINS

A

returns “True” if the user’s mentioned sub-string is present in the given string.

Example: CONTAINS(“University”, “versi”) = True

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

ENDSWITH

A

It returns “True” if the given string ends with the user’s mentioned sub-string
Example: ENDSWITH(“University”, “sity”) = True

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

FIND

A

returns the position of the mentioned sub-string within the given string. If the sub-string isn’t found then it returns 0(zero)

Example: FIND(“University”, “versi”) = 4

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

ISDATE

A

used to check whether the given string is a valid date. If the string is valid date then it returns “True”

Example: ISDATE(“2017-05-12”) = True

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

LEFT

A

returns the specified number of characters from the start of the string

Example: LEFT(“Calculation”, 4) = Calc

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

LEN

A

returns the number of characters in the given string.

Example: LEN(“Calculation”) = 11

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

LOWER

A

Convert a text string to all lowercase letters

Example: LOWER(“CalCulation”) = calculation

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

MID

A

It returns the characters from the middle of a text string given a starting position and length.

Example: MID(“Tableau”,2,4) = able

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

REPLACE

A

returns a string in which every occurrence of the substring is replaced with the replacement string.

Example: REPLACE(“Calculation”, “ion”, “ed”) = Calculated

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

RIGHT

A

returns the specified number of characters from the end of the given string

Example: RIGHT(“Calculation”, 4) = tion

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

TRIM

A

Returns the string with both trailing and leading spaces removed

Example: TRIM(“ Budget “) = Budget

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

UPPER

A

Convert a text string to all uppercase letters

Example: LOWER(“Budget”) = BUDGET

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

DATEADD

A

Add an increment to the specified date and returns the new date.

Example: DATEADD(‘month’, 3, #2017-07-12#) = 2017-10-12 12:00:00 AM

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

DATEDIFF

A

Returns the difference the two dates where start_date is subtracted from end_date

Example: DATEDIFF(‘month’, #2017-04-12#, #2017-07-15#) = 3

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

DATENAME

A

Returns the part of the given date as string.

Example: DATENAME(‘month’, #2017-05-14#) = May

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

DATEPARSE

A

It converts a string to a date in the specified format

Example: DATEPARSE(“dd.mmmm.yyyy”, “15.April.2017”) = 2017-04-15 12:00:00 AM

33
Q

DATEPART

A

Returns a part of the given date as an integer where the part is defined by date_part.

Example: DATEPART(‘month’, #2018-01-17#) = 1

34
Q

MONTH

A

Returns the month of the given date as an integer

Example: MONTH(#2018-02-19#) = 2

35
Q

TODAY

A

Returns the current date

36
Q

YEAR

A

Returns the year of the given date as an integer

Example: YEAR(#2018-02-19#) = 2018

37
Q

DATE

A

Returns a date given a number, string or date expression

Example: DATE(“2011-03-12”) = 2011-03-12

38
Q

FLOAT

A

It returns the floating number from the given expression of any type

Example: FLOAT(“3”) = 3.00

39
Q

INT

A

Returns an integer given an expression

Example: INT(-9.7) = -9

40
Q

STR

A

Returns a string given an expression

Example: STR(90) = “90”

41
Q

AND

A

This function performs the logical conjunction of two or more expression. “AND” returns “True” when all the given expressions are true.

42
Q

CASE

A

This function finds the first that matches the given and returns the corresponding

Example:
CASE [Name] WHEN “John” THEN 90
WHEN “Emma” THEN 95
END

43
Q

IFELSE

A

It tests a series of expressions and returns only that value corresponding to the first expression is true

Example:
IF [Profit] >0 THEN “Profitable”
ELSEIF [Profit] = 0 THEN “Breakeven”
ELSE “Loss”
END
44
Q

OR

A

This function performs the logical disjunction on two or more expression. “OR” returns “True” when any of the given expressions are true.

45
Q

ATTR

A

It returns the value of the given expression if it only has a single value for all the row in the group., otherwise it displays an asterisk (*). NULL values are ignored by this function

46
Q

AVG

A

It returns the average value of the given expression or array of values

47
Q

COUNT

A

It returns the count of items in the group. NULL values are not counted

48
Q

COUNTD

A

It returns the unique count of items in the group.

49
Q

MEDIAN

A

Returns the median value of an expression across all records

Example: MEDIAN([Profit])

This expression will return the median value of the profit across all the profit values

50
Q

PERCENTILE

A

an aggregate calculation that returns the percentile value from the given expression, corresponding to the specified percentile value

Example: PERCENTILE([Sales],0.9) = This expression will return the 90th percentile value from all the Sales value

51
Q

SUM

A

returns the sum of the given expression or array of values

52
Q

SPLIT

A

separate values based on a separator or repeated pattern - like first and last names

53
Q

LOOKUP

A

returns the value of the expression in a target row, specified as a relative offset from the current row.

LOOKUP(expression, [offset])

Example: LOOKUP(sum([employee count]),-1)

this calc finds the difference in number of employees hired from previous year (row)

54
Q

TOTAL

A

returns the total for the given expression in a table calculation partition. Use this calculation for totals.

Example: TOTAL(SUM([Employee Count]))

this gives total number of employees hired each year

55
Q

RANK

A

returns the standard competition rank for the current row in the partition. Identical values are assigned an identical rank. Use the optional ‘asc’ | ‘desc’ argument to specify ascending or descending order. The default is descending.

​RANK(expression, [‘asc’|’desc’])

56
Q

WINDOW_AVG

A

WINDOW_AVG(expression, [start, end])

returns the average of the expression within the window. The window is defined by means of offsets from the current row.

57
Q

INDEX

A

returns the index of the current row in the partition, without any sorting with regard to value

58
Q

FIRST

A

returns the number of rows from the current row to the first row in the partition

example: LOOKUP(ZN(SUM([Employee Count])), FIRST())

The first part of the calculation finds the value for the current row, and the second finds the value for the first row.

59
Q

LAST

A

returns the number of rows from the current row to the last row in the partition.

EXAMPLE: LOOKUP(ZN(SUM([Employee Count])), LAST())-LOOKUP(ZN(SUM([Employee Count])), FIRST()).

The first part of the calculation finds the value for the last row, and the second part finds the value for the first row.

60
Q

WINDOW_MAX

A

Returns the maximum of the expression within the window. The window is defined by means of offsets from the current row

Example
WINDOW_MAX(SUM([Profit]), FIRST()+1, 0) computes the maximum of SUM(Profit) from the second row to the current row

61
Q

PREVIOUS_VALUE

A

Returns the value of this calculation in the previous row. Returns the given expression if the current row is the first row of the partition.

Example
SUM([Profit]) * PREVIOUS_VALUE(1) computes the running product of SUM(Profit)

62
Q

RANK_DENSE

A

Returns the dense rank for the current row in the partition. Identical values are assigned an identical rank, but no gaps are inserted into the number sequence.

63
Q

RANK_MODIFIED

A

Returns the modified competition rank for the current row in the partition. Identical values are assigned an identical rank

64
Q

RANK_PERCENTILE

A

Returns the percentile rank for the current row in the partition.

65
Q

RANK_UNIQUE

A

Returns the unique rank for the current row in the partition. Identical values are assigned different ranks.

66
Q

RUNNING_AVG

A

Returns the running average of the given expression, from the first row in the partition to the current row.

RUNNING_AVG(SUM([Profit])) computes the running average of SUM(Profit).

67
Q

RUNING_COUNT

A

Returns the running count of the given expression, from the first row in the partition to the current row.

Example
RUNNING_COUNT(SUM([Profit])) computes the running count of SUM(Profit)

68
Q

RUNNING_MAX

A

Returns the running maximum of the given expression, from the first row in the partition to the current row.

Example
RUNNING_MAX(SUM([Profit])) computes the running maximum of SUM(Profit)

69
Q

RUNNING_MIN

A

Returns the running minimum of the given expression, from the first row in the partition to the current row.

RUNNING_MIN(SUM([Profit])) computes the running minimum of SUM(Profit).

70
Q

RUNNING_SUM

A

Returns the running sum of the given expression, from the first row in the partition to the current row.

Returns the running sum of the given expression, from the first row in the partition to the current row.

71
Q

SIZE

A

Returns the number of rows in the partition.

72
Q

WINDOW_SUM

A

Returns the sum of the expression within the window. The window is defined by means of offsets from the current row

calculate a weight for each category and then apply that to the priority score.

Example
WINDOW_SUM(SUM([Profit]), FIRST()+1, 0) computes the sum of SUM(Profit) from the second row to the current row

73
Q

difference from

A

computes the difference between the current value and another value in the table for each mark in the visualization

74
Q

moving calculation

A

determines the value for a mark in the view by performing an aggregation (sum, average, minimum, or maximum) across a specified number of values before and/or after the current value

typically used to smooth short-term fluctuations in your data so that you can see long-term trends

75
Q

percent difference from

A

computes the difference between the current value and another value in the table as a percentage for each mark in the visualization

76
Q

percent from

A

computes a value as a percentage of some other value—typically, as a percentage of the previous value in the table—for each mark in the visualization.

77
Q

Percent of Total calculation

A

computes a value as a percentage of all values in the current partition.

78
Q

percentile

A

computes a percentile rank for each value in a partition.

79
Q

running total calculation

A

aggregates values cumulatively in a partition.