Forum Discussion
savanahubio
8 years agoFrequent Visitor
Relationship between 2 tables
Hello, I am trying to look at Sales versus Sales Forecast. My sales Table is daily data by item. My Forecast table is by week and item. How can I create a relationship so I can look at...
- 8 years ago
Hi savanahubio,
Based on my test, you should be able to use the formula below to create a new measure to calculate the forecast value, then show the created measure as Line Values on the chart to get the expected result without creating any relationships in your scenario.
Measure = CALCULATE ( SUM ( 'POS Forecast'[POS Forecast] ), FILTER ( 'POS Forecast', CONTAINS ( 'Daily Sales by Item', 'Daily Sales by Item'[Item Description], 'POS Forecast'[Item Description] ) && 'POS Forecast'[Year] = MAX ( 'Daily Sales by Item'[Year] ) && 'POS Forecast'[Week Num] = MAX ( 'Daily Sales by Item'[Week Num] ) ) )Here is the modified pbix file for your reference. :smileyhappy:
Regards
parry2k
Super User
8 years agoYou need to have date dimension in your model and then link your both tables on date with this date dimension table.
Use period from date table on x axis and values from these tables and tht will do the job. There are many articles on how to create date/calendar dimension for time intelligence reporting.