<?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: Automate dimension/measure creation for ad hoc report in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960457#M329667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thank you for your response, Benjamin! That's a great idea. I was trying to avoid using macros because of performance requirements, but I will only have to run this once, so it's a great solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thank You!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Liz&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Sep 2015 14:44:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-29T14:44:20Z</dc:date>
    <item>
      <title>Automate dimension/measure creation for ad hoc report</title>
      <link>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960454#M329664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica, sans-serif; font-size: 13.3333px;"&gt;La&lt;SPAN style="font-size: 10pt;"&gt;st year &lt;A href="https://community.qlik.com/qlik-users/30985"&gt;jason.michaelides&lt;/A&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: Helvetica, sans-serif; font-size: 10pt;"&gt;posted a really helpful blog article entitled &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: bold; line-height: 1.5em;"&gt;"&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-6046"&gt;Customisable Straight (and Pivot) Tables - more food for thought&lt;/A&gt;".&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13.3333px; font-family: Helvetica, sans-serif;"&gt;In it, he describes how to make an ad hoc report displaying the first n-dimensions and measures selected by a user from a list box of dimensions and measures. The developer must create a placeholder for each of the n-dimensions and measures using the FirstSortedValue function. So, if the end user needs the ability to add 10 dimensions/measures, the developer must create 10 placeholder dimensions/measures.&amp;nbsp; From Jason's post, the dimensions and measures are created in a straight/pivot table as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13.3333px; font-family: Helvetica, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px; background-color: white;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;$(='[' &amp;amp; FirstSortedValue(%Dimension_Name,%Dimension_Position,1) &amp;amp; ']') for the first dimension&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px; background-color: white;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;$(='[' &amp;amp; FirstSortedValue(%Dimension_Name,%Dimension_Position,2) &amp;amp; ']') for the second dimension&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px; background-color: white;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;etc etc and&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px; background-color: white;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;$(='[' &amp;amp; FirstSortedValue(%Measure_Expression,%Measure_Position,1) &amp;amp; ']') for the first expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px; background-color: white;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;$(='[' &amp;amp; FirstSortedValue(%Measure_Expression,%Measure_Position,2) &amp;amp; ']') for the second expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px; background-color: white;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;etc etc&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px; background-color: white;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; padding-left: 30px; background-color: white;"&gt;&lt;SPAN style="color: #3d3d3d; font-style: inherit; font-size: 13.3333px; font-family: Helvetica, sans-serif; font-weight: inherit;"&gt;For the enable conditions, Dim1 just needs GetSelectedCount(%Dimension_Name) &amp;gt;= 1, Dim2 just needs GetSelectedCount(%Dimension_Name) &amp;gt;= 2 etc and Expr1 just needs GetSelectedCount(%Measure_Name) &amp;gt;= 1, Expr2 just needs GetSelectedCount(%Measure_Name) &amp;gt;= 2 etc&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13.3333px; font-family: Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; color: #3d3d3d; font-size: 13.3333px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Helvetica, sans-serif; color: #3d3d3d; font-size: 13.3333px; line-height: 1.5em;"&gt;My application requires the end user to be able to add &amp;gt;100 dimensions/measures to the ad hoc chart. Is there a way to automate the process of creating the placeholders so I don't have to create &amp;gt;100 placeholder dimensions/measures? Moreover, is there a way for the placeholder dimensions/measures to by dynamically created so, for instance, if only 12 dimensions/measures are selected by the user, only 12 dimensions/measures are created in the chart?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13.3333px; font-family: Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13.3333px; font-family: Helvetica, sans-serif;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13.3333px; font-family: Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13.3333px; font-family: Helvetica, sans-serif;"&gt;Liz&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 13:19:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960454#M329664</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-29T13:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Automate dimension/measure creation for ad hoc report</title>
      <link>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960455#M329665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Liz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This can be done with a macro and there are some examples in this forum from a long time ago (there was one in particular but I can't remember who posted it right now).&amp;nbsp; However it's generally advisable to avoid doing it this way - apart from anything else if you use a macro to create a new chart each time then your .shared file will grow when it may not have to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know it's a hassle to set up the first time, however try setting up all the dims/measures as described in my post and see how it performs when only a few are selected (there will be an overhead to evaluate that many conditional expressions, but they are simple and this may well perform OK).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two points:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. There is a significant upgrade to this solution I developed with a colleague &lt;A href="https://community.qlik.com/qlik-users/166839"&gt;JoeSimmons&lt;/A&gt;‌ that avoids the need for InputField and allows even more flexibility and extended use of bookmarks.&amp;nbsp; You can see it &lt;A href="http://www.qlikdevgroup.com/#downloads"&gt;here&lt;/A&gt; (Downloads from Session 4 section). Check it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Do you REALLY have to allow your users to create a table with over 100 columns?&amp;nbsp; How is that useful? If so, maybe a different approach is needed that converts columns multiple fields into a single field with CrossTable() then uses the new dimension pivoted across the top? See an explanation &lt;A href="http://www.qlikdevgroup.com/#downloads"&gt;&lt;SPAN style="color: #0066cc; text-decoration: underline;"&gt;here&lt;/SPAN&gt;&lt;/A&gt; (Session 2 downloads - Handling Wide Datasets)&lt;/P&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;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 13:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960455#M329665</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2015-09-29T13:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Automate dimension/measure creation for ad hoc report</title>
      <link>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960456#M329666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not exactly the same method but it's similar. I had the same issue so I created a small macro to create the table for me. The one already saved has 300 dimensions and metrics. It's probably a bit much for most scenarios but it was needed in my case. I then just copy the objects into the final QVW where I'm going to use it and make a copy of the Ad Hoc file to feed in the expressions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 13:52:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960456#M329666</guid>
      <dc:creator>bme</dc:creator>
      <dc:date>2015-09-29T13:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Automate dimension/measure creation for ad hoc report</title>
      <link>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960457#M329667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thank you for your response, Benjamin! That's a great idea. I was trying to avoid using macros because of performance requirements, but I will only have to run this once, so it's a great solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thank You!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Liz&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 14:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960457#M329667</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-29T14:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Automate dimension/measure creation for ad hoc report</title>
      <link>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960458#M329668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neat!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 08:09:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960458#M329668</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2015-09-30T08:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Automate dimension/measure creation for ad hoc report</title>
      <link>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960459#M329669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your detailed reply. I ended up implementing your second solution, and it worked really well!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a new issue as a result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the pivoted columns are currency and some are normal numbers. Do you know if there is a way to conditionally format the contents of the pivoted dimension so only some of the resulting columns are formatted as currency?&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;Liz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 21:10:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960459#M329669</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-01T21:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Automate dimension/measure creation for ad hoc report</title>
      <link>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960460#M329670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Liz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We did add that on actually. I'll try and dig it out for you - you set a default in the script/expression source then the user can overwrite them and bookmark the new format codes. The downside of implementing variable formatting however is that on export to Excel all formatting is lost. Excel picks them up as numbers no problem but with all decimal places, no currency formatting etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 06:29:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Automate-dimension-measure-creation-for-ad-hoc-report/m-p/960460#M329670</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2015-10-02T06:29:25Z</dc:date>
    </item>
  </channel>
</rss>

