<?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: Is it possible to run a macro for each row of a chart (table) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699797#M1073300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can call a VBScript function from a front end expression.&amp;nbsp; The best bet is to follow the advice from &lt;A href="https://community.qlik.com/qlik-users/105590"&gt;Raphael Pacheco&lt;/A&gt;&amp;nbsp; and create the appropriate expressions in the chart.&amp;nbsp; I can't imagine that it would be impossible (well, I admit in advance that my imagination is limited &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Aug 2014 17:39:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-08-02T17:39:17Z</dc:date>
    <item>
      <title>Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699793#M1073294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm new to Qlikview and have had a search around but couldn't find what I'm after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart which has a 1 dimension (region) and several expressions (sales, cost, margin etc.). One of my expressions needs some quite specific calculations, so I've put this in a macro (VB script).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is for each row (region) that is written to the chart (there's only about 10 regions in all) I want to execute the macro but it doesn't seem to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm aware that I could create a calculated dimension as part of the chart but when I try and build the expression it won't allow me to execute a macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Geoff.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 14:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699793#M1073294</guid>
      <dc:creator />
      <dc:date>2014-08-01T14:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699794#M1073296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you share an example? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 14:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699794#M1073296</guid>
      <dc:creator>Yousef_Amarneh</dc:creator>
      <dc:date>2014-08-01T14:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699795#M1073298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe that you can solve this problem without the use of macros. &lt;/P&gt;&lt;P&gt;If you can post an example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 15:12:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699795#M1073298</guid>
      <dc:creator>rphpacheco</dc:creator>
      <dc:date>2014-08-01T15:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699796#M1073299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;thanks for the responses. I'll have to create a test Qlikview to show the issue, which will take me some time, but in the mean time are you able to answer the question please? . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is for each row in a chart I want to execute a macro (call a function or sub-routine). Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 17:18:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699796#M1073299</guid>
      <dc:creator />
      <dc:date>2014-08-02T17:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699797#M1073300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can call a VBScript function from a front end expression.&amp;nbsp; The best bet is to follow the advice from &lt;A href="https://community.qlik.com/qlik-users/105590"&gt;Raphael Pacheco&lt;/A&gt;&amp;nbsp; and create the appropriate expressions in the chart.&amp;nbsp; I can't imagine that it would be impossible (well, I admit in advance that my imagination is limited &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Aug 2014 17:39:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699797#M1073300</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-02T17:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699798#M1073301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are settings within the easter eggs with which you could activate vbs-functions in gui - right click on qlik-logo in bottom left corner from about qlikview - but I'm quite sure like the other guys here you didn't need it, all calculations could be done with native qlikview-functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally it should be definitely the last step to use these hidden and not supported settings. Be careful …&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="easter_egg.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/63623_easter_egg.jpg" style="width: 620px; height: 481px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 08:49:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699798#M1073301</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-08-03T08:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699799#M1073302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;thanks for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've changed that setting to a 1 to allow macro functions in expressions but I still seem unable to call the macro from within the expression. Are you able to give a brief, simple example please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To explain my problem . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble getting the budget column of a sheet to show the correct value. What is happening is that the budget is being summed for customers who have sales this year, rather than the full budget for all customers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, for example, consider the following data . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer&amp;nbsp;&amp;nbsp; Region&amp;nbsp;&amp;nbsp; Sales&amp;nbsp;&amp;nbsp; Budget&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 90&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 70&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The budget is summed as follows . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum([Budget Budget Value])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following chart is displayed . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Region&amp;nbsp;&amp;nbsp; Sales&amp;nbsp;&amp;nbsp; Budget&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 70&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 170&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 90&lt;/P&gt;&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As there are no sales for customer 5 yet, their budget is not included in the total budget for region = A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following doesn't work either . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({1}[Budget Budget Value])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No matter what I try, I can't get this to work. One solution is to have dummy records for the customer that don't yet have sales but that corrupts other things (averages, counts etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I decided I would try and build the Sum() function via a macro. I'm having some success with this but I can't call the macro when each row is loaded, only when a selection is changed etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the reason for me asking about how do I call a macro (sub-routine/function) from within the edit expression window? In my mind, as each row of my chart is being calculated (10 rows) I would like to call a macro which creates the Sum function for the correct region and including any user selections (year, quarter, period, sales family, customer).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Geoff.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 14:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699799#M1073302</guid>
      <dc:creator />
      <dc:date>2014-08-03T14:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699800#M1073303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the description it looks like the non-zero Sales are selected somehow.&amp;nbsp; Need to see a data model, or better an example of the application to see what's going on.&lt;/P&gt;&lt;P&gt;The solution may involve a change in the data model.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 15:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699800#M1073303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-03T15:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699801#M1073304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;you said . . ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"From the description it looks like the non-zero Sales are selected somehow."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no specific selection logic, but it is the non-zero sales that we are displaying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We sum the sales and alongisde this we sum the budget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the only budget records summed are those that belong to customers that have a sale, not all budget records are summed and thus the budget is being understated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 16:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699801#M1073304</guid>
      <dc:creator />
      <dc:date>2014-08-03T16:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699802#M1073305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't use these functionality in productive. Some years ago I have tested if it will generally work and it did. There are various possibilities why it could fail. My suggestion was only for a local client and not for a server environment - possibly there are similar settings but I'm not sure. Further it must be proper functions and not subs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think the reason is in your data-model. It sounds that you have linked tables for sales and budget in your data-model. This won't work if some areas have sales and none budget or some have budgets and none sales then this will lead to links against null. In this case these tables must be concatenated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 16:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699802#M1073305</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-08-03T16:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699803#M1073306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Geoff&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is a very simple qvw with a single table loaded via an Inline Load and it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect your data model has more than one table in it though..&amp;nbsp; Could you post an image of your data model.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Aug 2014 16:58:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699803#M1073306</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-03T16:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699804#M1073307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;thanks for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies but my sample data was poor and misleading. First of all, I should have explained that I have a sales file, which can contain many records per customer, and a budget file, which contains 1 record per customer. So, for example, consider the following data . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer&amp;nbsp;&amp;nbsp; Region&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 45&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer&amp;nbsp;&amp;nbsp; Budget&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 90&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80&lt;/P&gt;&lt;P&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 70&lt;/P&gt;&lt;P&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 60&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Note, no sales yet for customer 5. Now, when I present the sum of the sales and the sum of the budget, only budget values to which we have a sale are summed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Geoff.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 10:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699804#M1073307</guid>
      <dc:creator />
      <dc:date>2014-08-04T10:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699805#M1073312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as per your sample data if I create a qvw with simply associating Sales and budget base don customer id then I can find proper results in the chart. Can you please elaborate your problem a little bit?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="128013.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/63664_128013.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 11:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699805#M1073312</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2014-08-04T11:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699806#M1073315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudeep/all,&lt;/P&gt;&lt;P&gt;please review the attached simple .qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at the Region table you will see the following . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Region&amp;nbsp; Sales&amp;nbsp; Budget&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 150&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1200&lt;BR /&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 55&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&lt;BR /&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&lt;BR /&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1110&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I assume is happening is that only the budget data that has matching sales data are being summed - In other words, for customer 1 (region A) , periods 1, 2, and 3 are summed because there are sales records for those periods. For customer 2 (region B), only period 1 is summed etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need to be able to do is . . .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are no selections, show the full budget for each region, even if customers within that region have no sales data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there are selections - same as above but take in to account the selections (so, if a user selects period 1, I want to see the full budget for period 1 for that region.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Geoff.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 12:22:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699806#M1073315</guid>
      <dc:creator />
      <dc:date>2014-08-05T12:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699807#M1073316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your data-model isn't suitable then there are synthetic keys and generellay how above mentioned to link these both tables will cause problems if some ares have no mathcing together. You need to concatenate these tables:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load * From Sales;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; concatenate&lt;/P&gt;&lt;P&gt;Load * From Budget;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/04/16/synthetic-keys" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/16/synthetic-keys"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/16/synthetic-keys&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 12:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699807#M1073316</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-08-05T12:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699808#M1073317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;in my actual .qvw I do not have synthetic keys. I have changed the attached .qvw to also not have synthetic keys and I still have the same issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were to concatenate the tables then won't I have a problem whereby my budget is over-stated because each sales row for period 1 will contain period 1's budget and this will be accumulated many times?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Geoff.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 13:19:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699808#M1073317</guid>
      <dc:creator />
      <dc:date>2014-08-05T13:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to run a macro for each row of a chart (table)</title>
      <link>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699809#M1073318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geoff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have had the same challange to have sales-data with many rows per date and budget-data with one row per month. The only what you need is to create a date form you time-period-field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load Customer, Date, Sales From Sales;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; concatenate&lt;/P&gt;&lt;P&gt;Load Customer, makedate(Year, Month, 1) as Date, Budget From Budget;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this linked to a master-calendar and further dimension-tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 14:27:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-it-possible-to-run-a-macro-for-each-row-of-a-chart-table/m-p/699809#M1073318</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-08-05T14:27:29Z</dc:date>
    </item>
  </channel>
</rss>

