Forum Discussion
Combining 2 Consecutive Measures (Historical and Projected)
- 9 years ago
The issue was that when the second measure uses the first one as a baseline in a separate table (with dates not connected), it calculates the final value for the first date and then uses that constant as the base for the rest of the measure. However, once you relate the dates to a table to combine them, I no longer get that final constant, and get a blank, as the first measure doesn't calculate as anything for the dates of the second measure.
I fixed this by keeping the historical measure as it was, and changing the projected measure to cover both the historical and projected portion. Then putting the historical as the line on top on the graph, so the only visible portion of the projected line is the actual projections.
The table with the dates that you use for the axis need to be one for both tables so you have Temp1 and Temp2 should be only Temp and this.one related with both tables, since both have two measures with adjacent dates this would.give you the chart you are looling for when combining the 2 measures in one chart.
Regards,
MFelix
MFelix ,
Thanks for your response. I have tried this and unfortunately It does not work.
When I make a New Table that has all the dates between the two ranges (and relate those tables), use that as the axis, and plot the two measures this is what I get.
If I plot either of them individually on the axis of their individual table it comes out fine. But when I try to graph them on this index it does not work, and it doesn't even show the projection dates.
- MFelix9 years ago
Super User
HI askelton,
I made a sample of your data an tried the solution I gave you and as you can see the result is as expected, the only thing I cannot copy is the measures since I don't have the full layout of you setup, and did it with the values you placed in your images, however I believe that the result may be also achievable in your part.
Assumptions on my setup:
- 2 Tables - 1 Historical - 1 Projections
- 1 Calendar - This is made from a combination of unique values from Date column of the two previous tables
- Relationship One to Many
- Calendar[DateFixed] (One) -> Historical[Date] (Many)
- Calendar[DateFixed] (One) -> Projections[Date] (Many)
- Don't make filter for both sides
- Axis of chart is the Calendar[DateFixed] column
- Both Measures are placed in the lines
How do you have your calendar table made? How is it related with thew other tables?
I believe that you are getting this type of chart because of the way the calendar and the two other tables are related.
Regards,
MFelix
- askelton9 years ago
Resolver I
The issue was that when the second measure uses the first one as a baseline in a separate table (with dates not connected), it calculates the final value for the first date and then uses that constant as the base for the rest of the measure. However, once you relate the dates to a table to combine them, I no longer get that final constant, and get a blank, as the first measure doesn't calculate as anything for the dates of the second measure.
I fixed this by keeping the historical measure as it was, and changing the projected measure to cover both the historical and projected portion. Then putting the historical as the line on top on the graph, so the only visible portion of the projected line is the actual projections.