Pivot Table Issues

How to Hide Future Months in an Excel Pivot Chart Running Total

Aamir Naveed AkramAamir Naveed Akram Oct 28, 2026 869 views

Question details

The user needs to prevent a PivotChart from displaying a flat running total line for future months that do not have any data yet.

How to Hide Future Months in an Excel Pivot Chart Running Total
Product
Excel 365 (Power Pivot / Power Query)
Device & OS
not provided
Scenario
Creating a dynamic PivotChart using a DAX TOTALYTD measure to display monthly values and running totals.
Observed behavior
The running total calculation carries the last value forward, causing the PivotChart to display a continuous flat line for future months that haven't occurred.
Before you start

Ensure you have access to the Power Pivot data model in your Excel 365 workbook and know the name of the DAX measure controlling your running total.

Solution 1Recommended

Adjust the DAX Measure to Return BLANK for Future Dates

Modify your existing DAX TOTALYTD formula to check if the calendar date is in the future, returning BLANK() so the PivotChart drops the line entirely.

When using a standard TOTALYTD calculation in Power Pivot, the measure evaluates to the last known cumulative total for future dates. This causes an unwanted flat line on the PivotChart.

By adding an IF statement that compares the dataset's calendar date to the current date, you can force future periods to evaluate as BLANK(). Excel PivotCharts automatically ignore BLANK() values, effectively hiding future months from the visual.

1
Open the Power Pivot window

In your Excel workbook, navigate to the 'Power Pivot' tab on the ribbon and click 'Manage' to open the data model.

2
Locate your running total measure

Find the calculation area at the bottom of your data table where your TOTALYTD measure is currently defined.

3
Update the DAX formula

Edit the DAX formula to wrap your existing calculation in an IF condition. For example: =IF(MAX('Calendar'[Date]) <= TODAY(), [Your_TOTALYTD_Measure], BLANK())

4
Save and close Power Pivot

Press Enter to save the updated measure, ensure there are no syntax errors, and then close the Power Pivot window.

5
Refresh your PivotChart

Return to your Excel worksheet, select your PivotChart, and click 'PivotChart Analyze' > 'Refresh' to apply the updated DAX measure to your visual.

Chart Automatically Updated: The running total line will now stop accurately at the current month and will dynamically expand as new months occur.
Free Microsoft Office alternative

Need a simpler way to manage spreadsheet data?

While advanced DAX measures require Microsoft Power Pivot, many everyday data summarization and charting tasks can be handled seamlessly with WPS Office. It provides powerful standard PivotTables and an intuitive interface without the hefty subscription fees.

  1. 1. Open your data file in WPS: Launch WPS Spreadsheet and open your existing .xlsx workbook directly.
  2. 2. Insert a PivotTable: Select your data range, navigate to the Insert tab, and click PivotTable to summarize your data.
  3. 3. Create a PivotChart: Select your generated PivotTable, go to the Insert tab, and choose Chart to visualize your trends easily.
Free, lightweight, and fast installationHighly compatible with Microsoft Excel (.xlsx) formatsRobust built-in PivotTable and PivotChart features for daily data analysisFamiliar user interface for a zero-learning-curve migration
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel PivotChart show a flat line for future months?

By default, a running total calculation carries the last accumulated value forward. For future dates where no new data exists, it simply adds zero, resulting in a continuous flat line on your chart.

Can I hide empty months in a PivotTable without using DAX?

Yes. You can right-click the date field in your PivotTable, select 'Filter', and choose 'Date Filters' or use 'Value Filters' to manually exclude future dates. However, this method requires manual updating as time progresses.

What is the BLANK() function in DAX used for?

The BLANK() function in DAX returns an empty value, which acts similarly to a null. In charting, returning BLANK() prevents Excel from plotting a data point, effectively hiding the line or bar for that specific period.