ad

Scenario 33: How to display Current Year and Previous Year sales with Current Year dates in same sheet

I got a requirement to show current year and previous year sales side by side with current year dates in single sheet.

Here is the sample data looks like below

Here is the sample report which I was asked to build

It is not as easy as you think. It might take a while to solution it. I written below calculation to show this report.

CY Calculation is straight forward, either you can create below calculation or use direct sales column. Just rename Sales to CY and use that.

PY Calculation needs thought process. How you will show previous year sales with current year dates? Simple I had written below calculation

Now the report looks like below

As we do not want to display 2019 year either we can exclude that manually in filter or write below calculation drag that to filer shelf then select “TRUE” to work dynamically for every year.

Final report looks like this

 

Scenario 32: Tableau Trick: How to default current date in parameter

If you are following Tableau new features, you might observe that there is a new feature in parameter to default a value whenever workbook opened (available 2020.1 onwards). By using this feature, we can default today’s date parameter calendar. Parameter selection shows current date when ever workbook is opened freshly.

Let us follow the steps:

Step 1:

Create a date parameter to pick date from calendar.

This will show calendar view to pick date

In above it is showing date selection as 11/24/2020. So, every time whenever it is opened it will be defaulted to same date.

If you observe in below image you will see one new option “Value when workbook opens”. It is defaulted to “Current Value” then workbook always opens with same value.

If we assign dynamic value to this then workbook will open with dynamic value. For this scenario we want to open workbook with current date every day.

Let us create calculation for dynamic date.

Step 2:

 

Step 3:

Assign this “Today” field in Date Parameter. Edit Date Parameter and Change “Value when workbook opens” to “Today” (you can select Today calc field in drop down list)

Now this parameter will show current date dynamically on every day.


Do you feel that you are Tableau Expert? Then try this challenge 36

Hello All…

Here I am coming with new challenge. Use below dataset and solve this challenge.

Region

Number of Customers

Number of Orders

East

2

0

East

3

1

West

9

0

West

3

1

West

1

2

South

24

0

South

6

1

South

10

2

South

3

3

South

5

More Than 3

North

6

1

North

4

2

 Using above data build below report in Tableau.






Note: Avg column is based on below calculation

Avg: sum (Number of customers * Number of orders) / Total Number of orders

Note: if number of orders is more than 3 then I am multiplying with 4. You can see Avg for South.

Avg for East: ((0 *2) + (1* 3)) / 5 = 0.60

Avg for North: ((1*6) + (2*4)) / 10 = 1.40

Avg for South: ((0*24) + (1*6) + (2*20) + (3*3) + (5*4))/48 = 1.15

Avg for West: ((0*9) + (1*3) + (2*1))/13 = 0.38

For more challenges: Click Here

Experiment… Observe… Learn…

Scenario 31: How to drill down from measure names using parameter actions

Have you ever asked to do drill down on metrics? Have you ever tried this?

I was faced this challenge long back. But I did not have solution at that time. But now we can do this using parameter actions.

See below I am showing profit and sales by region using stack bar chart. Now I would like to drill based on my action on profit or sales.









If I click on Sales, then I want to display sales report or if I click on profit then I want to display profit report.

Step 1: Build Stack bar chart like below.








Step 2: Create parameter with list values as Profit and Sales. (same as Measure Names)





















Step 3: Create Metric Calculation based on parameter values














Step 4: Create drill down report

















Step 5: Build Dashboard









Step 6: Create Parameter action.










































Now you can drill down by clicking on stack bar. This is simple example to show parameter action. But you can use this as power pull as you think.


I hope you learned new thing. Enjoy.

Do you feel that you are Tableau Expert? Then try this challenge 35

Hello All…

Here I am coming with new challenge. This is simple challenge. Here I am not providing dataset you can use Tableau super store dataset. 

Here I built simple report with Region and Segment. For each row I am providing two links which will navigate to Google and Gmail in browser. This report I built in single sheet. Just try and let me know your feedback on this challenge. When you click on Google it should navigate to Google website. Similarly for Gmail, it should navigate to Gmail.


For more challenges: Click Here

Experiment… Observe… Learn…

Tableau Free Webinar Series: Beginner, Intermediate and Advanced Level

Hello to All,

Tableau is offering free webinar series at 3 level of knowledge base. You can choose any of beginner, intermediate and advanced level. You can attend multiple levels also. You can find certain topics relevant to you in different paths and feel free to attend. If you are unable to attend live sessions, make sure you register to receive the recordings as soon as they are available.


Do you feel that you are Tableau Expert? Then try this challenge 34


Hello All…

Here I am coming with new challenge. This is simple challenge. Just want to give a thought on this kind of challenges. I solved this with one calculated field. Here I am not providing dataset you can use Tableau super store dataset.

We have daily sales information in super store dataset. You can see in below image.


Scenario: User will select date in Parameter and want to see sale for selected date along with last six months last day sales. See below explanation.

User Selected date: 5/11/2018 (i.e May 11th 2018). 

Now in report we will show like this.


 You can verify the sales numbers in below image.

























For more challenges: Click Here

Experiment… Observe… Learn…

Do you feel that you are Tableau Expert? Then try this challenge 33


Hello All…
Here I am coming with new challenge.
Have you ever built NPS gauge chart in Tableau? Let’s try to build as shown below.
My data looks like below table. I have date and NPS score for each date. Build NPS gauge chart for each date.


Color Code Logic:
NPS Score < 50 then Red
NPS Score >= 50 and NPS Score < 80 then Yellow
NPS Score >= 80 then Green

See NPS gauge chart which I built:









































For more challenges: Click Here
Experiment… Observe… Learn…