How to Hide Future Months in an Excel Pivot Chart Running Total
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.

- 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.
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.
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.
In your Excel workbook, navigate to the 'Power Pivot' tab on the ribbon and click 'Manage' to open the data model.
Find the calculation area at the bottom of your data table where your TOTALYTD measure is currently defined.
Edit the DAX formula to wrap your existing calculation in an IF condition. For example: =IF(MAX('Calendar'[Date]) <= TODAY(), [Your_TOTALYTD_Measure], BLANK())
Press Enter to save the updated measure, ensure there are no syntax errors, and then close the Power Pivot window.
Return to your Excel worksheet, select your PivotChart, and click 'PivotChart Analyze' > 'Refresh' to apply the updated DAX measure to your visual.
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. Open your data file in WPS: Launch WPS Spreadsheet and open your existing .xlsx workbook directly.
- 2. Insert a PivotTable: Select your data range, navigate to the Insert tab, and click PivotTable to summarize your data.
- 3. Create a PivotChart: Select your generated PivotTable, go to the Insert tab, and choose Chart to visualize your trends easily.

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.




