Forum Discussion
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-16 | 27-Apr-16 | 28-Apr-16 | 29-Apr-16 | 30-Apr-16 | 1-May-16 | ||
| Impressions served (table A) | 100 | 200 | 300 | 250 | 275 | 300 | ||
| Impressions Forecasted (Table B) | 225 | 300 |
having a calendar table makes your life much easier (because you get to use the time intelligence functions)
you can do those calculations without it but you'll have to write a bit more
look here at this link provided by Matt
http://www.powerpivotpro.com/2015/02/create-a-custom-calendar-in-power-query/
19 Replies
- Greg_DecklerCommunity 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, 2016 100 Wednesday, April 27, 2016 200 Thursday, April 28, 2016 300 Friday, April 29, 2016 250 Saturday, April 30, 2016 275 Sunday, May 1, 2016 300 ImpressionsForecasted
DateForecast
Friday, April 29, 2016 225 Saturday, April 30, 2016 300 Relationships are:
Visualization is:
- elatreilleHelper 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_DecklerCommunity 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.