<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamic chart creation via script... in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/2525962#M1226601</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is it possible to write something like dynamic run for 'Field1' to 'Filed100' as well as histogram change auto as a loop?&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;</description>
    <pubDate>Fri, 01 Aug 2025 08:52:15 GMT</pubDate>
    <dc:creator>james99</dc:creator>
    <dc:date>2025-08-01T08:52:15Z</dc:date>
    <item>
      <title>Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239218#M866338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to both QlikView &amp;amp; Qlik Sense, testing them out to see if they meet my needs.&amp;nbsp; I'm leaning towards QlikView as it appears to have more scripting capabilities.&amp;nbsp; However, I was wondering if it's possible to create multiple charts dynamically via script.&amp;nbsp; So, using a really basic example, I would like to create a dynamic number of histograms, &lt;SPAN style="text-decoration: underline;"&gt;one per incoming field&lt;/SPAN&gt;, showing the values and counts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I have a flat file containing 37 fields, is it possible to loop through each of the fields and create 37 different chart histograms?&amp;nbsp; Or could be 1 histogram per tab, with 37 tabs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I were to pseudocode it...&amp;nbsp; (Yeah, I'm a SQL guy...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14813067917599999" jivemacro_uid="_14813067917599999" modifiedtitle="true"&gt;
&lt;P&gt;Load file(s) into TABLE1&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;declare X integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , total_columns integer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , field_name varchar&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;set X = 1&lt;/P&gt;
&lt;P&gt;set total_columns = count(columns) from TABLE1&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;While X &amp;lt;= total_columns&lt;/P&gt;
&lt;P&gt;&amp;nbsp; begin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set field_name = name(columnnumber(X))&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create_chart [name: chart + string(X)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , type: barchart&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , x_axis: columnnumber(X)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , y_axis: count(*)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , title: field_name&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , appearance: default]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X = X + 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; end&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Auto-arrange page&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Going forward, I would make this more complex depending on the incoming data type (e.g. do something different with dates), but I'm just trying to proof-of-concept this idea...&amp;nbsp; I also understand that not every chart would be readable (e.g. a comments field), but I'd be OK with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incoming files could contain &lt;EM&gt;hundreds&lt;/EM&gt; of columns, so manually creating a chart for each column is impractical.&amp;nbsp; And using VBScript with Excel would also not work, as I'm dealing with datasets with &amp;gt;1 million rows of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239218#M866338</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239219#M866339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of generating hundreds of charts you might as well create only one and select a specific field you want to analyse. Crosstable loading your table would give you one field of field names to select in while another field would hold all field values to create your chart with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_242909_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146242_QlikCommunity_Thread_242909_Pic1.JPG" style="height: 204px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_242909_Pic2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/146252_QlikCommunity_Thread_242909_Pic2.JPG" style="height: 205px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_242909_Pic3.JPG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/146253_QlikCommunity_Thread_242909_Pic3.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_242909_Pic4.JPG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/146254_QlikCommunity_Thread_242909_Pic4.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If one histogram at a time is not enough, you could use a trellis chart to present multiple histograms simultaneously:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_242909_Pic5.JPG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/146255_QlikCommunity_Thread_242909_Pic5.JPG" style="height: 326px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your script could be as short as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14813227653561225 jive_text_macro" jivemacro_uid="_14813227653561225"&gt;
&lt;P&gt;CrossTable (FieldName, FieldValue)&lt;/P&gt;
&lt;P&gt;LOAD 1, *&lt;/P&gt;
&lt;P&gt;FROM &lt;D&gt; (txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/D&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 22:36:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239219#M866339</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-12-09T22:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239220#M866340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First off, apologies for my delayed response.&amp;nbsp; Anyway, I was able to get your solution partially working, which gets me closer to my goal!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when applying your example to my data, each trellis chart's X-axis contains values from &lt;STRONG&gt;all fields&lt;/STRONG&gt;, not just the ones applicable to that chart.&amp;nbsp; In your sample, it looks like each field (&lt;EM&gt;field1&lt;/EM&gt; thru &lt;EM&gt;field100&lt;/EM&gt;) contains the same values: 1-30.&amp;nbsp; In my data, some columns are IDs, dates, strings, etc.&amp;nbsp; So, when I used your sample file with my dataset, the trellis charts &lt;STRONG&gt;&lt;EM&gt;often&lt;/EM&gt;&lt;/STRONG&gt; had common X-axis label values, even if the value itself didn't appear in the raw data for that field (e.g. SOME_AMT shows an ID, a date, some number, etc.) Only when I select a specific value in FieldName, the chart shows me only that field's values--but then I'm limited to that one chart, which is what I'm trying to avoid...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume there's some chart option that I haven't selected that would limit the X-axis values to that chart's &lt;EM&gt;FieldName&lt;/EM&gt;?&amp;nbsp; I tried chart Properties / Dimension Limits / [FieldValue] Restrict which values are displayed using the first expression (e.g. largest 10 values), but I found that just changed which entries appeared on the chart--but most of the charts still had the common X-axis values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I'll append a screenshot in a little bit once I redact some parts.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other question... Given this is a CrossTable (a cross-join?) I was curious to know how well this scales with larger datasets?&amp;nbsp; QV was fluctuating between using 2-8GB RAM, all for a dataset that's only ~428,000 rows...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 23:36:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239220#M866340</guid>
      <dc:creator />
      <dc:date>2016-12-15T23:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239221#M866341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's what I'm seeing...&lt;/P&gt;&lt;P&gt;&lt;IMG alt="trellis.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146915_trellis.png" style="height: 299px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;As you can see, there's duplication of the X-axis values in many of the fields, but not all.&amp;nbsp; Some of these datatypes (e.g. xxx_DT or xxx_AMT) shouldn't have some values (e.g. an ID value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping there's a solution as I feel this gets me REALLY close to where I need to be!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 20:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239221#M866341</guid>
      <dc:creator />
      <dc:date>2016-12-16T20:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239222#M866342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using some reduced sample data with some different field values per field,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="146913" alt="QlikCommunity_Thread_242909_Pic6.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146913_QlikCommunity_Thread_242909_Pic6.JPG" style="height: 145px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one solution might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As QlikView keeps trellis charts comparable, i.e. using common axes, I tried with suppressing the original dimension labels and showing "text on axis" instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="146914" alt="QlikCommunity_Thread_242909_Pic7.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/146914_QlikCommunity_Thread_242909_Pic7.JPG" style="height: 253px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="146921" alt="QlikCommunity_Thread_242909_Pic8.JPG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/146921_QlikCommunity_Thread_242909_Pic8.JPG" style="height: 231px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="146922" alt="QlikCommunity_Thread_242909_Pic9.JPG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/146922_QlikCommunity_Thread_242909_Pic9.JPG" style="height: 508px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="146923" alt="QlikCommunity_Thread_242909_Pic10.JPG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/146923_QlikCommunity_Thread_242909_Pic10.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To even suppress the missing value spaces you could extend this solution with consecutive field value autonumbers per field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="146924" alt="QlikCommunity_Thread_242909_Pic11.JPG" class="jive-image image-6" src="https://community.qlik.com/legacyfs/online/146924_QlikCommunity_Thread_242909_Pic11.JPG" style="height: 255px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="146925" alt="QlikCommunity_Thread_242909_Pic12.JPG" class="jive-image image-7" src="https://community.qlik.com/legacyfs/online/146925_QlikCommunity_Thread_242909_Pic12.JPG" style="height: 240px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14819280524731248" jivemacro_uid="_14819280524731248"&gt;
&lt;P&gt;tabTemp:&lt;/P&gt;
&lt;P&gt;First 40&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;FROM &lt;D&gt; (txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/D&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabTemp2:&lt;/P&gt;
&lt;P&gt;CrossTable (FieldName, FieldValue)&lt;/P&gt;
&lt;P&gt;LOAD 1, *&lt;/P&gt;
&lt;P&gt;Resident tabTemp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table tabTemp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabFieldValues:&lt;/P&gt;
&lt;P&gt;LOAD FieldValue,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FieldName,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoNumber(FieldValue,FieldName) as FieldValueNo&lt;/P&gt;
&lt;P&gt;Resident tabTemp2&lt;/P&gt;
&lt;P&gt;Order By FieldValue;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table tabTemp2;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Dec 2016 22:41:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239222#M866342</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-12-16T22:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239223#M866343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll get to this tomorrow.&amp;nbsp; However, I'm trying a parallel option - using a module to dynamically loop through the fields. That question is in a different reply on this question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 22:46:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239223#M866343</guid>
      <dc:creator />
      <dc:date>2016-12-19T22:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239224#M866344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, I'm trying a parallel option.&amp;nbsp; One where I get the data via Edit Script, then using a module (hopefully) loop through all the field names &amp;amp; create one histogram per field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I'm having difficulties getting the code to work.&amp;nbsp; Specifically, I now realize that the "NoOfFields" function can only be called via Edit Script, and not in Edit Module (which returns a "Type mismatch: 'NoOfFields'" error).&amp;nbsp; This leads me to believe that the "fieldName" function won't work in Edit Module... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/angry.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, here's what I have in Edit Script:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14821889371299644" jivemacro_uid="_14821889371299644" modifiedtitle="true"&gt;
&lt;P&gt;RawData:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;FROM &lt;C&gt;&lt;/C&gt;&lt;/P&gt;
&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '|', msq);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;FROM &lt;C&gt;&lt;/C&gt;&lt;/P&gt;
&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '|', msq);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;let fn_tot = NoOfFields("RawData");&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this is what I have in Edit Module:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14821890633406952" jivemacro_uid="_14821890633406952" modifiedtitle="true"&gt;
&lt;P&gt;Sub BarChart&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Check whether stored bar chart id exists in the sheet&amp;nbsp; &lt;/P&gt;
&lt;P&gt;set v = ActiveDocument.GetVariable("vVar1")&amp;nbsp; &lt;/P&gt;
&lt;P&gt;set s=ActiveDocument.ActiveSheet&amp;nbsp; &lt;/P&gt;
&lt;P&gt;for i=0 to s.NoOfSheetObjects-1&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if s.SheetObjects(i).GetObjectId =&amp;nbsp; v.GetContent.String then&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Msgbox "Bar chart already exists. Delete the existing one to create a new bar chart.."&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Exit Sub&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; End if&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;next&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;For fn = 1 to fn_tot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set fname = fieldName(fn, "RawData")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Call&amp;nbsp; GenerateBarChart (fname)&lt;/P&gt;
&lt;P&gt;next&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;'--ORIGINAL&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Call&amp;nbsp; GenerateBarChart ("field1")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Call&amp;nbsp; GenerateBarChart ("field2")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;End Sub&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;'======================================================================&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Sub GenerateBarChart (FldNm)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Dim myChart&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Create a new Bar Chart&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Set myChart = _&amp;nbsp; &lt;/P&gt;
&lt;P&gt;ActiveDocument.ActiveSheet().CreateBarChart()&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Reset the variable&amp;nbsp; &lt;/P&gt;
&lt;P&gt;set v = ActiveDocument.GetVariable("vVar1")&amp;nbsp; &lt;/P&gt;
&lt;P&gt;'---------------v.SetContent myChart.GetobjectId , true&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Add a dimension of Country to the new chart&amp;nbsp; &lt;/P&gt;
&lt;P&gt;myChart.AddDimension FldNm&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Add an expression&amp;nbsp; &lt;/P&gt;
&lt;P&gt;myChart.AddExpression "Count (Z)"&lt;/P&gt;
&lt;P&gt;' Get the properties object&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Dim cp&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Set cp = myChart.GetProperties()&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Set the title of the dimension&amp;nbsp; &lt;/P&gt;
&lt;P&gt;cp.Dimensions(0).Title.v = "Script " &amp;amp; FldNm&lt;/P&gt;
&lt;P&gt;' Set the Title-in-chart text&amp;nbsp; &lt;/P&gt;
&lt;P&gt;cp.ChartProperties.Title.Title.v = "ChartProperties " &amp;amp; FldNm&lt;/P&gt;
&lt;P&gt;' Set the Window title&amp;nbsp; &lt;/P&gt;
&lt;P&gt;cp.GraphLayout.WindowTitle.v = "WindowTitle " &amp;amp; FldNm&lt;/P&gt;
&lt;P&gt;' Set sort by Y-Value&amp;nbsp; &lt;/P&gt;
&lt;P&gt;cp.SortByYValue = -1&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Get the expression properties&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Dim expr, exprvis&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Set expr = cp.Expressions.Item(0).Item(0).Data.ExpressionData&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Set exprvis = cp.Expressions.Item(0).Item(0).Data.ExpressionVisual&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Set the Expression label&amp;nbsp; &lt;/P&gt;
&lt;P&gt;exprvis.Label.v = "Label V " &amp;amp; FldNm&lt;/P&gt;
&lt;P&gt;' Set the "Values on Data Point" option&amp;nbsp; &lt;/P&gt;
&lt;P&gt;exprvis.NumbersOnBars = -1&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Set the number format for the expression&amp;nbsp; &lt;/P&gt;
&lt;P&gt;exprvis.NumberPresentation.Dec = "."&amp;nbsp; &lt;/P&gt;
&lt;P&gt;exprvis.NumberPresentation.Fmt = "#,##0.00"&amp;nbsp; &lt;/P&gt;
&lt;P&gt;exprvis.NumberPresentation.nDec = 2&amp;nbsp; &lt;/P&gt;
&lt;P&gt;exprvis.NumberPresentation.Thou = ","&amp;nbsp; &lt;/P&gt;
&lt;P&gt;exprvis.NumberPresentation.Type = 11 'fixed&amp;nbsp; &lt;/P&gt;
&lt;P&gt;exprvis.NumberPresentation.UseThou = 1&amp;nbsp; &lt;/P&gt;
&lt;P&gt;' Apply the modified properties&amp;nbsp; &lt;/P&gt;
&lt;P&gt;myChart.SetProperties cp&amp;nbsp; &lt;/P&gt;
&lt;P&gt;End Sub&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Thanks to &lt;A href="https://community.qlik.com/thread/215729"&gt;Macro generates chart but continously and I want once&lt;/A&gt; for the idea on the code!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, if I hardcode the field names (e.g. "ORIGINAL" section above), I get one chart per field, yet if I try to loop through all the fields, nothing happens.&amp;nbsp; I'm guessing it's something simple and that I'm close...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2016 23:11:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239224#M866344</guid>
      <dc:creator />
      <dc:date>2016-12-19T23:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239225#M866345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marco...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I've concluded that the CROSSTABLE approach probably won't work--it doesn't appear to scale well.&amp;nbsp; When I loaded a full file (172 MB flat file source // 428k records * 39 columns) into your &lt;STRONG&gt;v2&lt;/STRONG&gt; attachment above, the issue with the charts &amp;amp; x-axis field names was still a problem.&amp;nbsp; More appropriately, page rendering started giving me "Out of object memory" on the chart objects--despite having Win7 x64 and 16GB RAM. Going forward, I would likely need to load multiples of these files simultaneously &amp;amp; analyze all at once, hence needing a solution that can scale...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions on how to approach this with code / "parallel option" below?&amp;nbsp; I feel I'm close--all I really need is to figure out how to get the list of fields from a table ("RawData") that I can loop through, calling &lt;EM&gt;GenerateBarChart&lt;/EM&gt; once per field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your assistance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2016 20:05:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/1239225#M866345</guid>
      <dc:creator />
      <dc:date>2016-12-20T20:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic chart creation via script...</title>
      <link>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/2525962#M1226601</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is it possible to write something like dynamic run for 'Field1' to 'Filed100' as well as histogram change auto as a loop?&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 08:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dynamic-chart-creation-via-script/m-p/2525962#M1226601</guid>
      <dc:creator>james99</dc:creator>
      <dc:date>2025-08-01T08:52:15Z</dc:date>
    </item>
  </channel>
</rss>

