3 Replies Latest reply on Sep 6, 2016 1:22 AM by Maheshh C K

    Tableau - Complicated Trend Graph help needed.

    Maheshh C K

      Dear Team,

      I have a requirement of plotting a trend graph(line graph) based on time in x axis & the Measurement Values in Y-axis.

      My underlying data has a combination of dates, months, quarters, year as given below.

       

      Input data:

      S#

      Entity Name

      Frequency

      Period

      Measurement

      Reference Point

      1

      E1

      Daily

      25-Aug-16

      10

      12

      2

      E1

      Daily

      26-Aug-16

      11

      12

      3

      E1

      Daily

      27-Aug-16

      12

      12

      4

      E1

      Daily

      28-Aug-16

      13

      12

      5

      E1

      Daily

      29-Aug-16

      14

      12

      6

      E2

      Daily

      26-Aug-16

      15

      16

      7

      E2

      Daily

      27-Aug-16

      16

      16

      8

      E2

      Daily

      28-Aug-16

      17

      16

      9

      E4

      Monthly

      Jun-16

      20

      21

      10

      E4

      Monthly

      Jul-16

      21

      21

      11

      E4

      Monthly

      Aug-16

      22

      21

      12

      E5

      Quarterly

      Q2 2016

      23

      24

      13

      E5

      Quarterly

      Q3 2016

      24

      24

      14

      E6

      Annually

      2015

      25

      26

      15

      E6

      Annually

      2016

      26

      26

       

      Expected Output:

      • A parameter to be given for Frequency, so that the user can select the frequency that he wants to look at.
      • A filter should be given for the Entity name. This should be derived field from parameter i.e if Daily is given this filter should showcase only E1 & E2. If Quarterly is selected it should give only E5.
      • Selection on the entity filter we should have the trend graph (line graph) for the particular Entity for 4 values in x axis as default.
        • When E1 is selected from filter we should have trend graph from 26-Aug-2016 through 29-Aug-2016.
        • When E2 is selected we should have data from 25-Aug-2016 (for which data is not available) through 28-Aug-2016.
        • When E5 is selected we should have from Q4 2015 through Q3 2016.
      • User should also be given with the x-axis from to, which can be changed by the user to see the trend for the corresponding period after selection of the entity.

       

      Am a newbee in Tableau. Kindly hep me on the same.

       

      Thanks

      Maheshh

        • 1. Re: Tableau - Complicated Trend Graph help needed.
          Kathryn Bridges

          Hi Maheshh,

           

          Could you post a sample workbook so we can better understand the issue?

           

          Most of this should be able to be solved with parameters.

           

          Parameter 1 should be a list as E1, E2, E2, and then use that to create a calculated field:

           

          "If [Parameter1]="E1" then

               If [Period]<=[7/29/2016] and [Period]>=[7/26/2016] then [Period] end

          Elseif [Parameter1]="E2" then....

               End"

           

          You can also create a DateParameter for "Date Granularity" (Create a list in the Parameter called "Daily", "Monthly", "Quarterly", "Annually), and you'll want to have two calculated fields on this.

           

          The first would be:

           

          Calculation1=

           

          "If [DateParam]=[Frequency] then [Period] else null end"

           

          And then I would take that Calculated Field, and create:

           

          Caluclation2=

           

          "If [DateParam]="Daily" then Day([Period])

          elseif [DateParam]="Monthly" then Month([Period])

          ....

          end"

           

          You'll want to put Calculation 2 on the Rows, and then Measurement in the Rows.

           

          You'll have 2 Parameters the User can change, Date Granularity and Entity Name.

           

          Hope this helps!

          • 2. Re: Tableau - Complicated Trend Graph help needed.
            Tom W

            Hi Manesh,

            I'll be honest to say that you're more likely to get help if you start to make some progress on this and upload a Tableau Packaged Workbook showing that you've made an effort yourself.

            You've indicated that you're new to Tableau (welcome to the community!) so I'll point you to some concepts which should help you get started with your expected output:

            • 3. Re: Tableau - Complicated Trend Graph help needed.
              Maheshh C K

              Thanks Tom & Kathryn. I will work & start a new discussion with the updated doubts.