Forum Discussion

jsadams's avatar
jsadams
Frequent Visitor
9 years ago

Filter Function Help

Hello,

 

I'm in the process of trying to pull before and after construction information. I'm struggling to connect my table of construction dates to the time intelligence functions. I believe using the "filter related" is the correct place to start, but had a few questions on how it functions and how I can make use of this combination.

 

I have 3 tables, one date key table, one construction info table that has [ID],[construction start],[construction end]. Also the transaction table with [id],[transaction date],[visitors],[revenue].

 

I have no issue creating the relationships between the tables, the problem is getting the formula to look for the construction start/end date and summing up visitors based on time intelligence functions. Understand that the construction info table has multiple ID's and multiple const/open dates.

 

 I believe I would filter my transactions table and relate that to the construction info table, but how would I include time intelligence functions to give multiple breakouts?

 

 

Best,

JA

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Might need a small pic of your model showing the relationships.  Are the construction/transaction tables related by ID, with construction id a unique value?

    • jsadams's avatar
      jsadams
      Frequent Visitor

      transaction table:

      IDtransaction datetime segmentroom numbervisitorsrevenue
      46521/1/2010Morning11$             7.50
      78541/2/2010Afternoon25$         37.50
      96351/3/2010Before Noon34$         30.00
      78451/4/2010Morning46$         45.00

      construction table

      IDConstruction StartConstruction End
      46521/1/20103/15/2010
      78548/5/201112/7/2011
      96359/7/2011

      1/1/2012

      Date key table

      DateYearMonthWeekDay
      1/1/20102010115
      1/2/20102010116
      1/3/20102010117

       

      Tables are linked together by unique Building ID and I also linked everything to the Date table (in hopes of being able to manipulate views/cuts of data later).

      • Anonymous's avatar
        Anonymous
        Not applicable

        Ya, you will have an easy time w/ filtering transactions by date, and filtering transactions by construction... but you have an issue w/ your calendar table relating to construction table... since there are 2 dates.

         

        If you make a relationship between your calendar table and construction on Construct Start... then filtering to June 2010 is going to show ONLY construction that STARTED in June, which is... maybe not what you want?

         

        Let's talk about a specific measure to make this easier?  Like... you want... revenue year to date, broken out by construction?