Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I currently run the following macro whenever a selection takes place so that the number of rows can be included in each Chart's caption bar via a variable. This works fine...until the amount of data in the application gets larger. Then it runs really slow. Does anyone know how the same funtionality can be achieved using Actions rather than a macro?
Sub NoOfRows
ActiveDocument.Variables("vNumOfRowsCHWeight1").SetContent chart1.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHWeight2").SetContent chart2.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHWeight3").SetContent chart3.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHCollect1").SetContent chart4.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHCredit1").SetContent chart5.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHAll1").SetContent chart6.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHLead1").SetContent chart7.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHHold1").SetContent chart8.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHLead2").SetContent chart9.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHLate1").SetContent chart10.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHSamples1").SetContent chart11.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHComm1").SetContent chart12.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHLate2").SetContent chart13.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHFOB1").SetContent chart14.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHHold2").SetContent chart15.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHAlloc1").SetContent chart16.GetRowCount-1, true
ActiveDocument.Variables("vNumOfRowsCHCut1").SetContent chart17.GetRowCount-1, true
end Sub
For a chart with a simple dimension you can include the count of dimension values in the chart title. Make the chart title a text expression by using an equal sign as the first character. For example, for a chart where the dimension is CUSTNO the title can include row count something like this:
='Sales by Customer Chart - ' & num(count(distinct CUSTNO), '###,###') & ' rows'
Unfortunately, my charts are too complex for that. Multiple dimensions, set analysis, conditionally hide nulls, etc......
I'm about ready to give up on this. But what about this.....
Is there any way to give an icon (a minimized chart) a visual indicator if the chart contains no data (due to selections or set analysis constraints)?
I'm trying to find some way to let users know which charts they need to look at which ones they don't so that they don't have to restore each one to check..
bgarland,
I can't answer your question, but I appreciate your sharing the GetRowCount.. It answered my question of related to dynamically formating an Excel file (data exports from QlikView) via QlikView module. Very nice.
Thanks!
Tyler