<?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: bookmark as dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429458#M1166280</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ioannis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a ton, but, as I mentioned, I unfortunately cannot open .qvw files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you maybe just send me the macro in a text file and I'll copy and paste?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will run the macro after reloading the document daily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Sep 2012 07:02:29 GMT</pubDate>
    <dc:creator>gerhardl</dc:creator>
    <dc:date>2012-09-25T07:02:29Z</dc:date>
    <item>
      <title>bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429446#M1166262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way I can count the number of [FieldX] that "matches" a bookmark? i.e. if I selected the bookmark, how many Accounts (my FieldX) would be "possible valaues".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally I want to have a straight table with Bookmarks as my dimension and count([Account no]) as my expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 08:22:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429446#M1166262</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-21T08:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429447#M1166263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;count(distinct {BM01} &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;[FieldX]&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or maybe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count( {1&amp;lt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;[FieldX]&lt;/SPAN&gt;= P({BM01} &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;[FieldX]&lt;/SPAN&gt;)&amp;gt;} &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;[FieldX]&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 08:34:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429447#M1166263</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-21T08:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429448#M1166264</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;Not sure if you mean that as my expression or calculated dimension? but either way, it doesn't seem to work. See image attached.&lt;/P&gt;&lt;P&gt;That also specifies a bookmark - it would have to use something like 'BM*'&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="22276" alt="Count BM.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/22276_Count+BM.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also tried the second suggestion but it doesn't seem to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 08:41:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429448#M1166264</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-21T08:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429449#M1166268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works for me as an expression. See attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 09:03:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429449#M1166268</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-21T09:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429450#M1166270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm afraid I can't open your file (QV Personal Edition).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which of the two expressions did you use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is everything correct here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;count( {1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;[Account no]&lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;= P({BM05} &lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;[&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Account no&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;)&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;[&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;Account no&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I will then have to have a separate expression per Bookmark right? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 09:33:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429450#M1166270</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-21T09:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429451#M1166272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry - it does work! I had BM05 and there isn't such a bookmark. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But is there no way to use as dimension? I have SOOOOOOO many bookmarks, don't want individual expression for each.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 09:36:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429451#M1166272</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-21T09:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429452#M1166274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the counts as a dimension or the account no the bookmark returns?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 10:26:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429452#M1166274</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-21T10:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429453#M1166275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies - but I don't understand what you mean.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 10:30:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429453#M1166275</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-21T10:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429454#M1166276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we used count as a function which only returns one number for each bookmark. All those numbers should now be a dimension, or the [account no] these numbers counted? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 10:36:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429454#M1166276</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-21T10:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429455#M1166277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say I have 2 bookmarks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BM01: Currently it selects a possible 100 accounts.&lt;/P&gt;&lt;P&gt;BM02: Currently it selects a possible 25,543 accounts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of these "possble accounts" might apply to more than once bookmark.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 10:39:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429455#M1166277</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-21T10:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429456#M1166278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok after reading carefully I understand what you need. Dont know if this can be done but let me try. Just give me some time.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 11:56:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429456#M1166278</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-21T11:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429457#M1166279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could not do it as a dimension but created a macro that gets the job done, I hope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can add this macro as a document on open action and it will create all expressions needed based on available bookmarks when the user first opens the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached. Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ioannis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 15:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429457#M1166279</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-21T15:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429458#M1166280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ioannis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a ton, but, as I mentioned, I unfortunately cannot open .qvw files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you maybe just send me the macro in a text file and I'll copy and paste?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will run the macro after reloading the document daily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 07:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429458#M1166280</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-25T07:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429459#M1166281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry for that!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub createExpressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.GetSheetObject( "CH01" )&lt;/P&gt;&lt;P&gt;Set chartProperties= chart.GetProperties&lt;/P&gt;&lt;P&gt;Set chartExpressions= chartProperties.Expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i=0 to chartExpressions.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;chart.RemoveExpression 1&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bookmarks = ActiveDocument.GetDocBookmarkNames&lt;/P&gt;&lt;P&gt; for i = lbound(bookmarks) to ubound(bookmarks)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExpressionString = "Count(DISTINCT {" &amp;amp; bookmarks(i) &amp;amp; "} sales)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;chart.AddExpression ExpressionString&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set chart = nothing&lt;/P&gt;&lt;P&gt;Set chartProperties= nothing&lt;/P&gt;&lt;P&gt;Set chartExpressions= nothing&lt;/P&gt;&lt;P&gt;Set bookmarks = nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 07:55:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429459#M1166281</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-25T07:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429460#M1166282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works great! Just some small changes I would like to make:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See image 1(bookmark - duplicated). The very first bookmark shows twice for some reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Image 2 (bookmark - long name). You'll see that same of the bookmarks return NULL. These bookmarks all have really long names, and when I duplicate the bookmark and just rename it to "TEST", then it counts it. Is there a limit on the length of the bookmark name for this macro to work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, is there any way to give my expressions the name of the macro? &lt;/P&gt;&lt;P&gt;So instead of the label being &amp;lt;use expression&amp;gt;, it should be equal to the bookmark name.&lt;/P&gt;&lt;P&gt;I'd also like all the expressions' Total Mode to be set to "No Totals" but this is not important (just a bonus).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 08:12:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429460#M1166282</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-25T08:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429461#M1166283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay I figured out the "long name" issue. The problem was the spaces. I just changed to:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;EM&gt;&lt;STRONG&gt;ExpressionString = "Count(DISTINCT {'" &amp;amp; bookmarks(i) &amp;amp; "'} [Account no])"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still need help with the rest though, please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 08:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429461#M1166283</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-25T08:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429462#M1166284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;setting the totals mode is not possible :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/community.qlik.com/ideas/1587"&gt;http://community.qlik.com/ideas/1587&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything else should be covered by the following code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub createExpressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.GetSheetObject( "CH01" )&lt;/P&gt;&lt;P&gt;Set chartProperties= chart.GetProperties&lt;/P&gt;&lt;P&gt;Set chartExpressions= chartProperties.Expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i=0 to chartExpressions.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; chart.RemoveExpression 0&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bookmarks = ActiveDocument.GetDocBookmarkNames&lt;/P&gt;&lt;P&gt;j = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = lbound(bookmarks) to ubound(bookmarks)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExpressionString = "Count(DISTINCT {'" &amp;amp; bookmarks(i) &amp;amp; "'} sales)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; chart.AddExpression ExpressionString&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set cp = chart.GetProperties&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set expr = cp.Expressions.Item(j).Item(0).Data.ExpressionVisual&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expr.Label.v = bookmarks(i)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; chart.SetProperties cp&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; j = j + 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set cp = nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set expr = nothing&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set chart = nothing&lt;/P&gt;&lt;P&gt;Set chartProperties= nothing&lt;/P&gt;&lt;P&gt;Set chartExpressions= nothing&lt;/P&gt;&lt;P&gt;Set bookmarks = nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 11:33:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429462#M1166284</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2012-09-25T11:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: bookmark as dimension</title>
      <link>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429463#M1166285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect - thank you so much!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you feel like another challenge, please have a look at the &lt;A _jive_internal="true" href="https://community.qlik.com/message/261587#261587"&gt;other question I posted&lt;/A&gt;, which is related to this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 11:50:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/bookmark-as-dimension/m-p/429463#M1166285</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2012-09-25T11:50:25Z</dc:date>
    </item>
  </channel>
</rss>

