Active Member
Dashboards
Power Query
April 24, 2015
Hi everyone! Long time listener, first time caller...and big fan!
I create charts reflecting top 10 clients for a period of 3 years, and I use a specific format for all the charts I create. I've attached a sample spreadsheet showing a screenshot containing the chart and series data. Due to the size of this spreadsheet and the complexity of the columns/data sets/spill ranges, I didn't try to create a sample spreadsheet with the visible formulas. But I'm hoping it'll be easy enough to talk through the process and that my question will be easy to understand.
Columns V, W, X, AA, AB, AC, AD, and AE are all dynamic array spill ranges; the percentage series on the graph pulls from spill ranges in columns AB and AC, both of which have defined names and the chart references those named ranges. Columns Y and Z make up the horizontal axis labels (combos of columns V, AD, and W), but they are not dynamic array spill ranges. Currently I copy the formula in these columns down further than the spill ranges in the other columns (down to column 44, resulting in #N/A) so I use this offset formula to define this range: =OFFSET(ATTORNEY!$Y$2,0,0,COUNTIF(ATTORNEY!$Y$2:$Y$44,"#N/A"),2). It works perfectly fine, but what I would really like to do is be able to make those two columns a single spill range so I don't have to use offset. I'm not even sure if this is possible, but I've shifted most of my thinking/work/processes to using many dynamic arrays (though I know I'm still scratching the surface), so I wanted to see if anyone knows if this is possible with DAs.
Hopefully that makes sense!
Thank you!
Yvonne
Moderators
January 31, 2022
Tried to replicate your data with spilled arrays and constructed a single (rather ugly) formula that spills columns Y:Z, based on columns V, W and AD.
=HSTACK(V2#&" : "&TEXT(IF(V2#VSTACK(0,INDEX(V2#,SEQUENCE(ROWS(V2#)-1,,2)-1)),AD2#,""),"(0.00)"),W2#)
See if it works for you.
Answers Post
Active Member
Dashboards
Power Query
April 24, 2015
Thank you Riny! This was nearly perfect, and I was able to modify the formula a bit to make it exactly what I needed. Since I wanted both the year and the amount to only appear once, I modified it as follows: =HSTACK(IF(V2#VSTACK(0,INDEX(V2#,SEQUENCE(ROWS(V2#)-1,,2)-1)),V2#,"")&" "&TEXT(IF(V2#VSTACK(0,INDEX(V2#,SEQUENCE(ROWS(V2#)-1,,2)-1)),AD2#,""),"(0.00)"),W2#).
Now I will go through and analyze the formula so I understand exactly what it is doing and be able to use it going forward!! This was incredibly helpful. Thank you so very much for taking the time to look at this!!
Yvonne
Active Member
Dashboards
Power Query
April 24, 2015
One quick follow up on this - while it does spill into two columns, the chart doesn't seem to recognize it as being two separate columns so it doesn't display "correctly". But I also know that a feature that just came out is the chart's ability to work with dynamic arrays without having to have named ranges - so once I have that update, it might work the way that I want. Just wanted to post a follow up in case anyone uses charts in the same format that I do.
1 Guest(s)