Forum Discussion

callenbkd's avatar
callenbkd
Helper II
1 year ago
Solved

Line Chart with Two Lines and One only displaying data for Months selected

I'm trying to create a line chart that compares actuals to budget by month. 

 

I want the actual months to only show the line for the months from 1 to the month selected whereas the budget data would show all months for the year. 

There are other charts on the report that will only be used to display a specific period's data and there are slicers for year and period. 

 

If the user selects February, the line chart would show 12 months of budget data for the selected year and two months of actual data. 

Is there a way to do that even if the user selects a specific month from the slicer? 

  • callenbkd good solution from gmsamborn but to avoid flat line for actual, use following measure:

     

    Actual YTD = 
        CALCULATE(
            [Actual],
            DATESYTD ( 
                CALCULATETABLE ( VALUES ( 'Date'[Date] ),  'Date'[MonthNo] <= MAX( 'Month'[Month] ) ) 
             )
        )
    

16 Replies