Forum Discussion

Elliott's avatar
Elliott
Advocate II
10 years ago
Solved

How to specify different time periods from the same source data

Hello,

 

I am having difficulty attempting to figure out an issue I am currently facing.

 

I shall keep it in simple terms as my issue can apply to several different scenarios. 

 

Issue:

I have a single source of data compromising of several different columns.

One of the columns I have created is Date which simply holds the date of each entry in the database.

 

I would like to create 2 graphs. For instance, the first graph I would like to display the last 7 days worth of my live data. The second graph I would like to show the last 30 days worth of data. 

How can I set these time parameters to allow to me make 2 graphs, using the same data source, but to display 2 different periods of time?

 

I understand that I can manually select the Date column in the level filters, but this will only allow me to manually select which days I would like to display. Whereas, what I am trying to achieve is a graph in which I will not have to manually change the selection every week and would like it to display the latest 7/30 days worth of data at that current time.

 

Is this possible to apply this at the presentation stage of creating the report, or is this something I will have to amend during the data manipulation, either on desktop or SQL (as this is where my data resides)?

 

Thanks alot,

Elliott

 

 

 

 

Edit:

 

Through some more research.. It's looks like I am going to have to introduce a mesure('s), if someone could point me in the right direction regarding this, that would be great :smileyhappy:

  • Create a new column with the formula:

     

    Days Aging = DATEDIFF([Date],TODAY(),DAY)

     

    This will give you number of days in the past and allow you to use it as a filter in your visualizations for last 7 days and last 30 days.

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Create a new column with the formula:

     

    Days Aging = DATEDIFF([Date],TODAY(),DAY)

     

    This will give you number of days in the past and allow you to use it as a filter in your visualizations for last 7 days and last 30 days.