Tableau String Functions Assignment for Beginners

Here I am coming with assignment on Tableau string functions. This is very basic and fundamental assignment for beginners. Almost every body know functions in tableau. Lets see how they learned and understood.


In number functions assignment people are solving questions using string functions also. But these assignments are specific to category of functions. This assignment only on string functions.

1. How to count number of words in a sentence?

Example: 'Count the number of words in this sentence'

No of words in above sentence is: 8

2. How to write a calculation to reverse the words?

Example: "Suresh Nallapareddy" to "Nallapareddy Suresh"

3. How to count number of spaces in a string?

Example: 'Count the number of spaces in this sentence'

No of spaces in above sentence is: 7

4. How to convert "suresh reddy nallapareddy" to "Suresh Reddy Nallapareddy" (First letter of word should be capital)?

5. How to find first word in the string?

Example: 'find the first word in this string'

First word in the above string is: 'find'

6. How to find last word in the string?
Example: 'find the last word in this string'

Last word in the above string is: 'string'

7. How to find Nth word in a given string?

Example: 'find the 4th word in this string'

4th word in the above string is: 'word'

8. which function and how you will use to show "Suresh_Reddy_Nallapareddy" as "Suresh Reddy Nallapareddy"?

9. I have data like this

Name

Suresh*****
Ramesh***
Rakesh****

I want to show like this:

Name
Suresh
Ramesh
Rakesh

Single function can do this. What is that function and how you will write calculation for this?

10. How to calculate number of characters in a string after excluding spaces?

Example: 'Count the number of characters in this string excluding spaces'

Number of Characters in above string excluding spaces: 53

11. How to split email into 3 parts. See below example.

Email

suresh.n2008@gmail.com
suresh.n2008@tableauexpert.co.in
suresh.n2008@tableau.info

I want to show output like below:

Username           Domain                 Extension
suresh.n2008       gmail                      com
suresh.n2008       tableauexpert          co.in
suresh.n2008       tableau                    info

12. I have string like this: "s u r e s h" but i want to show it as "suresh".
Which function will do this? can you write calculation for this?



Tableau Number Functions Assignment for Beginners

Here I am coming with assignment on Tableau number functions. This is very basic and fundamental assignment for beginners. Almost every body know functions in tableau. Lets see how they learned and understood.

After several posts I understood that people are more interest in solving problems and learning from them. It will add taste to learning process. So I decided to post assignments and challenges. I would like to initiate the thought process in their mind while solving this assignments and challenges. So that they will improve their self learning capabilities. Giving solution to problems is like temporary fix. After few days you may forgot solution. But Solving problems will stamp the process for long time. I am just feeling this is new way of teaching people.

Question 1:

I have Region wise Profit like below

Region   Profit
East         50
West      -20
South      30
North     -15

I want to show bar chart Like Below



What function you will use while making above chart?



Question 2:

I have data like this

Items     Cost
Item1      5.125
Item2      1.890
Item3      4.578
Item4      6.009

I want to show output like below:

Items     Cost
Item1      6
Item2      2
Item3      5
Item4      7

What function you will use to get above output?



Question 3:

I have data like this

Items      Cost
Item1       7.135
Item2       4.999
Item3       8.011
Item4       5.875

I want to show output like below:

Items      Cost
Item1       7
Item2       4
Item3       8
Item4       5

What function you will use to get above output?



Question 4:

How you will get Quotient and Remainders in Tableau?

55(Dividend) ÷ 9(Divisor) = 6(Quotient) and 1(Remainder)

See below examples to understand more:

13/5 will give Quotient: 2 and Remainder: 3

21/5 will give Quotient: 4 and Remainder: 1




Question 5:

What function you will use in Tableau to get 5^3 = 625?



Question 6:

I have Sum(Sales) like this: 50.1234 but i want to show only 50.

Which function and how you will use it to get this output?



Question 7:

I have Sum(Sales) like this: 6789.2345 But i want to show like this 6789.2.

Which function and how you will use it to get this output?



Question 8:

I have number like this: 12345 but i want to truncate this number to 12340.

Similar way Truncate above number to 12300.

Which function and how you will use it to get above output?



Question 9:

How to convert NULL values to Zero in Tableau?



Question 10:

How to Find Square Root in Tableau?

Example: Square Root for 625 is 25.



Question 11:

I have data like this

Items      Cost
Item1      5.125
Item2      1.821
Item3      4.572
Item4      6.019

I want to show output like below:

Items     Cost
Item1     5.120
Item2     1.820
Item3     4.570
Item4     6.010

What function and how you will use it to get above output?



Question 12:

I have Customers and Profit like below

Customers        Profit
Suresh                50
Ramesh             -20
Mahesh              40
Kishore               0
Rama                  0
Kirshna            -10

I want to show report like below:

Customers     Profit      Indicator
Suresh               50                1
Ramesh            -20              -1
Mahesh             40                1
Kishore              0                 0
Rama                 0                 0
Kirshna            -10              -1

What function you will use to show indicator column?