Domain 1 & 2 Flashcards
DateDIFF Syntax
DATEDIFF(date_part,startdate,enddate,startofweek)
DATEDIFF(‘month’,[orderdate],[shipdate])
Where do columns and rows show up on axis?
Columns appear on X axis
Rows appear on Y axis
Replace a data source steps
- Open workbook with original data
2.Data Tab > New Data Source - Set up data in canvas (drag to canvas)
- Back to workbook
- Data Tab>Replace Data Source
6.Select current and replacement source
NOT- Go to data source page and select “add” - that causes a cross data
Ascending vs Descending
Ascending: going up 0 to 100
Descending: going down 100 to 0
Difference between Index and Rank Function
Index deals with physical position of the record. Rank deals with value of record with highest value at highest rank.
Rank_Dense
Optimist tie 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. Use the optional ‘asc’ | ‘desc’ argument to specify ascending or descending order. The default is descending.
With this function, the set of values (6, 9, 9, 14) would be ranked (3, 2, 2, 1).
Rank_Modified
Pessimist tie Returns the modified 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.
With this function, the set of values (6, 9, 9, 14) would be ranked (4, 3, 3, 1).
Rank_Percentile
Returns the percentile rank for the current row in the partition. Use the optional ‘asc’ | ‘desc’ argument to specify ascending or descending order. The default is ascending.
With this function, the set of values (6, 9, 9, 14) would be ranked (0.00, 0.67, 0.67, 1.00).
Rank_Unique
Returns the unique rank for the current row in the partition. Identical values are assigned different ranks. Use the optional ‘asc’ | ‘desc’ argument to specify ascending or descending order. The default is descending.
With this function, the set of values (6, 9, 9, 14) would be ranked (4, 2, 3, 1).
FIRST () function
Returns the number of rows from the current row to the first row in the partition. For example, the view below shows quarterly sales. When FIRST() is computed within the Date partition, the offset of the first row from the second row is -1.
0
-1
-2
-3
DATEPARSE
Converts Original date into a date format.
DATEPARSE(date_format,date_string)
DATEPARSE(‘yyyy-MM-dd’, “1986-03-25”) = #March 25, 1986#
DATEPARSE(‘yyyy-MM-dd’, [originaldate]) = #March 25, 1986#
DATETRUNC
Rounds up to first day of date_part
DATETRUNC(date_part, date, [start_of_week])
DATETRUNC(quarter, #9/22/2018#) = #7/1/2018#
P-Value
Measure of statistical confidence
Low P-Value vs High P-Value
Lower the P-Value, the greater the statistical confidence. Values below .05 are considered “statistically significant”
How are blends and left joins different?
Blends do not introduce duplication since aggregation happens before data sources are combined. In a Left join, sources are combined and then aggregation happens
Difference between a join and a blend in data connections
A join combines data first then aggregates after. a blend aggregates first then combines data.
IQR
Interquartile Range:
difference between upper and lower hinge
Range for middle 50% of data
Q3-Q1
UH-LH
Lower Hinge
25% of data is below lower hinge
“Lowest quarter”
“1st Quarter”
Q1
25% percentile
Upper Hinge
Highest quarter of data
Only 25% if data is above/higher
75% percentile
3rd Quarter
Q3
Best chart for distribution? Best chart for dates?
Histogram is the best chart for Distribution.
Line chart is the best chart for dates.
Measure Names and Measure Value fields are most used for:
When you want to dynamically switch between multiple measures in a viz (parameters)
What color pills are continuous and discrete data?
Continuous- Green
Discrete- Blue
Measure attributes
Measures are aggregated to the current level of detail. They are Quantitative. ( clicks, sales, profit, height). Often continuous in nature