Forum Discussion

SimonJacobs's avatar
SimonJacobs
Helper I
9 years ago

Help Creating A New Table

Hi,

 

I have a feeling this is pretty basic but can't find instructions on how to do it!

 

I have a dashboard set up that pulls data from several data files.  All data sources contain a date field.  I have added two columns to each data table, one which converts the date into a day number (so I can apply a filter to just display weekly data from a Sunday), the other contains the number of days since the most recent date in the table (so I can display the last 7 days of data).  This seems inefficient and I'd like to create a table that takes the date column from one of the sources, adds the two columns described above and then all the other tables look up to this table using the date field.  Could someone help me to do this please?

 

Many thanks,

 

 

Simon

6 Replies

  • Senario is not very clear to me but if you want to display weekly data from sunday you can add a new column with following formula:

     

    weeknum(date,1) to begine week with Sunday

    weeknum(date,2) to begine week with Monday

    • SimonJacobs's avatar
      SimonJacobs
      Helper I

      Thanks for the reply, however displaying the data's not the issue.  I'm able to filter the data to just show data from Sundays.  what I want is to create a table that has a date column - taken from one of the exisiting tables so the start and end dates correspond - plus the two calculated columns.  I'm fine with the calculations that need to go into the columns, I'm just not sure how to create the table.

       

      • CahabaData's avatar
        CahabaData
        Memorable Member

        when in data view, use the Modeling tab in the ribbon, select 'New Table'

         

        this will open the formula bar just below the ribbon where you can define your new table i.e.

         

        NewTable = Table1 [DateField]

         

        and this will create that table for you....  if Table 1's date field has repeating dates and you want just unique dates then wrap this with VALUES ( )