Forum Discussion

elatreille's avatar
elatreille
Helper I
10 years ago
Solved

2 date fields in different table

Hi everyone,

 

I am new to Power BI and I will need some help here. I have 3 tables where one is a middle one and the two others has the full data. In the first table I have historical data and in the other one I have forecasted data. Both has a date field. When putting a chart I would like to show the historical data and what was forecasted to a specific date. in the example below, I should see my 2 lines on top of each other for 2 days April 29 and 30. How can I do that? when I select my 2 fields and select the date field, the graph shows me two straigh line! Thanks! Eric

 

Date  26-Apr-1627-Apr-1628-Apr-1629-Apr-1630-Apr-161-May-16 
Impressions served (table A) 100200300250 275 300
Impressions Forecasted (Table B)    225300

19 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    I have three tables:

     

    ImpressionDates

    Date

    Tuesday, April 26, 2016
    Wednesday, April 27, 2016
    Thursday, April 28, 2016
    Friday, April 29, 2016
    Saturday, April 30, 2016

    Sunday, May 1, 2016

     

    ImpressionsServed

    DateImpressions

    Tuesday, April 26, 2016100
    Wednesday, April 27, 2016200
    Thursday, April 28, 2016300
    Friday, April 29, 2016250
    Saturday, April 30, 2016275
    Sunday, May 1, 2016300

     

    ImpressionsForecasted

    DateForecast

    Friday, April 29, 2016225
    Saturday, April 30, 2016300

     

    Relationships are:

     

    Visualization is:

     

     

    • elatreille's avatar
      elatreille
      Helper I

      Ok, I get that but what if my dates are in each table with the data...

      Do I need to have a table with the field date and fill it with each date of the calendar?

      Each table have around 500 lines.

       

      Thanks

      Eric

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        elatreille - I'm not understanding what you are asking "dates are in each table with the data". Yes, my model has dates in each table with the data. Can you explain a little more or post a screen shot of your tables or something?

         

        You would not necessarily need a separate date table with just a list of all dates if one of your tables includes all of the dates that you care about and has no repeat values.