Forum Discussion
Line and Stacked Column Chart - Data from two tables, with two dates on x-axis
I have two tables, Visits and EmailsSent. Each of these tables has a Date field, for visits it is the date of the visit, and for emails it is the date that the email was sent. I want to be able to show a count of visits as bars and a count of emails as a line, with the date being on the x-axis, but I'm not sure how to do that since there are two different date fields?
Hey sspears_tls,
You will want to make a Date/Calendar table and create a relationship between the 2 tables and the Date table.
Check out: link
CALENDAR and CALENDARAUTO:
https://msdn.microsoft.com/en-us/library/dn802546.aspx
Hope this helps,
Alan
3 Replies
- alanhodgsonSolution Supplier
Hey sspears_tls,
You will want to make a Date/Calendar table and create a relationship between the 2 tables and the Date table.
Check out: link
CALENDAR and CALENDARAUTO:
https://msdn.microsoft.com/en-us/library/dn802546.aspx
Hope this helps,
Alan
- sspears_tlsFrequent Visitor
Thanks alanhodgson, that's what I was afraid of. It seems like if I do this, I will need to populate the new Date table each time I want to include more data (future dates) is that right?
- alanhodgsonSolution Supplier
You can make the Date table as big as you want.
Date = CALENDAR("2000/01/01","2020/12/31")Results:
Best,
Alan