• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Preventing Blank Rows from Displaying|Dashboards & Charts|Excel Forum|My Online Training Hub

You are here: Home / Preventing Blank Rows from Displaying|Dashboards & Charts|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumDashboards & ChartsPreventing Blank Rows from Displayi…
sp_PrintTopic sp_TopicIcon
Preventing Blank Rows from Displaying
Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
1
December 11, 2019 - 2:08 am
sp_Permalink sp_Print

Hello,

In the attached file, I have a report that displays sparklines in column D, and graphs in columns W-AE off to the right. The sparklines reference columns AJ-AU. Columns AN-AU have zeros in them. They'll be filled in as the year progresses. Similarly, the graphs reference the columns for Jul-Oct 2019. If I reference the dates to also include Nov 2019-June 2020, the graph series will be short; most of the graph will be blank (using na() for zeros).

I would like to have both sparklines and graphs display only the dates for which I have actuals. I don't see how to do this without a lot of manual adjustments, and I've got 75 of these to generate every month.

What are some options?

Paul

sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4438
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
December 11, 2019 - 9:47 am
sp_Permalink sp_Print

Hi Paul,

You need to set up dynamic named ranges for the chart source data. For the Sparklines, you can use a relative dynamic named range. Note: the chart source data references require the dynamic named ranges to be fully qualified i.e. with the sheet name then the dynamic named range e.g.:

='Sheet 1'!YourDynamicNamedRange

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
3
December 12, 2019 - 6:13 am
sp_Permalink sp_Print

Hi Mynda,

I can see that using dynamic ranges would be useful here. As you add data to the range, the range changes automatically to pick it up. But what if my graph ranges are already set up for the whole year? With sparklines, the dynamic ranges work if the next column (in my example attached, Nov-19) is blank. Nov-19 could have "", or #NA, but it will never be blank—unless I manually add data for Nov-19 and fill in the vacant column. Sparklines interpret any of these as zero and will display zeroes for the remaining months, leaving extra space in the sparkline where I don't want it.

There's the same problem with graphs (where the month is the x-axis), but I found a workaround: If the month has no actuals yet, then the date reference could use an =NA() in the formula to produce #NA as the result. The graph will not show Nov-19 if there's no data yet for that month, even if the series range references the whole year.

Each month, I'll import the month's actuals into the file through Power Query, where formulas will then pick it up. Since I'm not adding data manually to the tables, the sparkline range has to be predefined as the whole year, but that leaves extra space in the sparkline cell. I could create sparkline-like graphs the size of the cell and then align them in the cell, but that's a pain.

What do you recommend?

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4438
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
December 12, 2019 - 10:45 am
sp_Permalink sp_Print

I'd just have a drop down somewhere in the workbook that allows you to choose the month you want the charts to display up to. You can reference this drop down value in the dynamic named range formula i.e. use INDEX & MATCH to find the column that contains the month selected in the drop down instead of say COUNT/COUNTA to find the last cell in the range.

Mynda

Avatar
SunnyKow
Puchong, Malaysia

VIP
Members


Trusted Members
Level 8
Forum Posts: 1432
Member Since:
June 25, 2016
sp_UserOfflineSmall Offline
5
December 18, 2019 - 10:17 am
sp_Permalink sp_Print

Hi Paul

Can't you just hide the columns AN:AU without data?

You can then display each column when you have new data.

Hidden columns will not be reflected on the charts / sparklines.

Sunny

Avatar
PaulFogel
Member
Members
Level 0
Forum Posts: 81
Member Since:
July 7, 2016
sp_UserOfflineSmall Offline
6
December 20, 2019 - 2:05 pm
sp_Permalink sp_Print

Yes, that'd work quite well, and it's simple, too. But I'll have 75 of these reports, and I'd rather have a more automated solution. Dynamic ranges work well for this purpose.

Paul

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Velouria, Dario Serrati
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
yashal minahil
Oluwadamilola Ogun
Yannik H
dectator mang
Francis Drouillard
Orlando Inocente
Jovitha Clemence
Maloxat Axmatovna
Ricardo Freitas
Marko Meglic
Forum Stats:
Groups: 3
Forums: 24
Topics: 6200
Posts: 27182

 

Member Stats:
Guest Posters: 49
Members: 31861
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.