Tableau Functions
Tableau Functions
1 Number Completed
2 String Completed
3 Date Completed
4 Logical Completed
5 Aggregation Completed
6 Type Convertion
7 User
8 Table Calculation
S No Function
ASCII ('A') 65
1 ASCII
Char (65) A
2 Char
Upper ( 'rajesh' ) RAJESH
3 Upper
Lower ( 'RAJESH' ) rajesh
4 Lower
Len ( 'Rajesh' ) 6
5 Len
Trim ( '_Rajesh_') Rajesh
6 Trim
LTrim ( '_Rajesh_') Rajesh_
7 Ltrim
RTrim ( '_Rajesh_') _Rajesh
8 Rtrim
Left ( 'Rajesh','3) Raj
9 Left
Right ( 'Rajesh','3) esh
10 Right
MiD ( 'Rajesh ' , 3 , 2) je
11 MiD
StartsWith ('Rajesh','Ra') TRUE
12 StartsWith
EndsWith ('Rajesh','sh') TRUE
13 EndsWith
Contains ('Rajesh', 'e') TRUE
14 Contains
15 Space Space (2 )
Find ('Database', 'a' ) 2
16 Find
Find Nth ('Database', 'a' , 3 ) 6
17 Find Nth
Replace ('Rajesh' ,'j' , 'm') Ramesh
18 Replace
Split ('A-B-C-D' , '-' , 2) B
19 Split
20 RegExp_Extract
21 RegExp_Extact_Nth
22 RegExp_Match
23 RegExp_Replace
24 IsDate
25 Min
26 Max
65
A
RAJESH
rajesh
6
Rajesh
Rajesh_
_Rajesh
Raj
esh
je
TRUE
TRUE
TRUE
2
6
Ramesh
B
S No Number Functions
ABS(-3433) 3433
1 ABS
Sign(-4234 ) --> -1
Sign Sign (3434) --> +1
Sign (0) ---> 0
2
Sqrt (4) 2
3 SQRT
Power ( 2 , 3) 8
4 Power
Sin(45) 0.85
5 Sin
Cos(45) 0.52
6 Cos
Tan(45) 10.61
7 Tan
Log(2,3) 0.63
8 Log 19
Ln(3) 1.09
9 Ln 19.1
19.4
10 Round 19.5
11 Ceiling 19.9
12 Floor (19.123,2)
ZN([Comm])
14 ZN --> Null will replace with "Zero" 19.125,2
Div(10,2) ---> 5
Dic(11,2) ---> 5
17 Div
18 Pi Pi() --> 3.141
19 CoT Cotangl;e
Degree
HexBin-X
HexNib-Y
Round Celing Floor
19 19 19
19 20 19
19 20 19
20 20 19
20 20 19
19.12
19.13
19.13
S No Date Functions Date Part
1 Now Year d
2 ToDate Month dd
3 Year Day D
4 Month Hour
5 Day Minute M
6 Date Name Second MM
7 Date Parse Week MMM
8 Date Add Quarter MMMM
9 Date DIFF Week Day
10 Date Trunc Day of the Yaer y
11 Y
12 yy
13 yyyy
14
12 IsDate
13 Min
14 Max
Day of the Week h (1,2,3….10,11,12)
Day of the Month hh (01,02,03….10,11,12)
Day of the Year H (1,2,3….,23,34)
HH (01,02,03…,23,34)
Mont( 1,2….10)
Month( 01 , 02 , 03 ,……12) m (1,2,3….57,58,59)
Month( Dec ) mm (01,02,03….57,58,59)
Month ( December )
s (1,2,3….57,58,59)
2017 ss (01,02,03….57,58,59)
2017
17 W
2017 ww
Q (1,2,3,4)
QQ (01,02,03,04)
QQQ Q1 ,Q2 , Q3, Q4
QQQQ 1st Qtr, 2 nd Qtr…
M # ) --->2017-12-31 05:35:55 PM
) ---> 2016-02-31 05:35:55 PM
) ---> 2015-12-17 05:35:55 PM
) ---> 2015-12-31 07:35:55 PM
) ---> 2015-12-31 05:37:55 PM
) ---> 2015-12-31 05:35:57 PM
) ---> 2015-12-31 05:35:55 PM
) ---> 2015-12-31 05:35:55 PM
16
16
00
99 2:35:00 AM
S No Date Functions
S No Date Functions Case
Case [Reg]
Case When "South" Then "Hyd"
IF When "North" Then "Delhi"
When "West" Then "Gujju"
IIF Else
"Others"
IFNULL End
ISNULL
IF [Job] ="CLERK"
AND
[Dept ID] = 20
THEN "LIG"
ELSE "ANIL"
END
IF IF-ElseIF
IF [Reg] = "East" IF [Reg] = "South"
Then Then "Hyd"
"Sun" ElseIF "North"
END Then "Delhi"
ElseIF "West"
Then "Gujju" IIF
Else "Others" ( [Rev] > 5000 , "High" ,
End
IF [Reg] = "East"
Then
"Sun"
ELSE IFNULL ( [Profit] , 0)
"Moon" Deec:
END Returns Exp-1 if not N
Returns Exp-2 if Null
IF [Mon] = "Jan"
OR
[Mon] = "Feb"
OR ISNULL ( [Profit] )
[Mon] = "Mar" Deec:
THEN "Quarter-1" Returns TRUE if Null
ELSE "Others" Returns FALSE if Not N
END
IF [Mon] = "Jan"
AND
[Loc] = "Hyd"
AND
[Prod] = "Mobile"
THEN "First_sale"
ELSE "Others"
END
IIF
( [Rev] > 5000 , "High" , "low" )
IFNULL
IFNULL ( [Profit] , 0)
Deec:
Returns Exp-1 if not Nul
Returns Exp-2 if Null
ISNULL
ISNULL ( [Profit] )
Deec:
Returns TRUE if Null
Returns FALSE if Not Null
S No Date Functions
3 ---> 3
Float(3) --> 3.00
7 Float
8 STR STR("45") --> 45 -- Converting Number into String
12/31/2017
12/11/2001
M")
9 01:34:51 PM
:21#) --> 02/14/2016 01:41:21 PM
er into String
S No User Functions
UserName -->
User Name