<?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 Dynamic Field Names in Load Script, Dynamic Coloring in Chart, Null Counts in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Dynamic-Field-Names-in-Load-Script-Dynamic-Coloring-in-Chart/m-p/1287456#M27064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently facing an interesting set of problems that I have found laborious workarounds for. Here's the basic problem statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are measuring the data quality of our warehouse. The basic measurement is the number of NULL values for each [Dimension] in each [Table] we wish to monitor. We'd then like to chart these as simple charts, two values per [Dimension], 'NULL' and 'Not NULL', and a count for each of those, based on a row count for the [Table].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way I accomplished this was loading each dimension as an if statement, if(isnull([Dimension]),'NULL','Not NULL') AS N_[Dimension]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works, but I have to manually (via simple excel formula) write all this out for each attribute. Not ideal. The first ask, how do I configure a Loop that does:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each FieldName in Table&lt;/P&gt;&lt;P&gt;if(isnull(FieldName),'NULL','Not NULL') AS 'N_' &amp;amp; FieldName&lt;/P&gt;&lt;P&gt;Next FieldName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or something similar to that. That would give me a duplicate set of Dimensions with only Null and Not Null as values, instead of the thousands they currently contain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next part of this is charting and coloring this - I will create one chart per Dimension, and we have hundreds over many tables, so this takes a while. The goal is to copy them and change AS LITTLE AS POSSIBLE in each chart to make it work correctly. Currently, I change the Dimension (easy, drag and drop replace), but the color has to be modified. I use a colormix1([Dimension],color1,color2) since it allowed me to double-click the [Dimension] and copy past the name from the title block of the chart. Is there a better way to do this part, too? What about something that automatically pulls the [Dimension] name from another chart value, like title, [Dimension], data, etc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is a better way to get these metrics, including restructuring the data, I'm all ears. Thanks in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Dec 2021 15:42:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2021-12-22T15:42:54Z</dc:date>
    <item>
      <title>Dynamic Field Names in Load Script, Dynamic Coloring in Chart, Null Counts</title>
      <link>https://community.qlik.com/t5/App-Development/Dynamic-Field-Names-in-Load-Script-Dynamic-Coloring-in-Chart/m-p/1287456#M27064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently facing an interesting set of problems that I have found laborious workarounds for. Here's the basic problem statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are measuring the data quality of our warehouse. The basic measurement is the number of NULL values for each [Dimension] in each [Table] we wish to monitor. We'd then like to chart these as simple charts, two values per [Dimension], 'NULL' and 'Not NULL', and a count for each of those, based on a row count for the [Table].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way I accomplished this was loading each dimension as an if statement, if(isnull([Dimension]),'NULL','Not NULL') AS N_[Dimension]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works, but I have to manually (via simple excel formula) write all this out for each attribute. Not ideal. The first ask, how do I configure a Loop that does:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each FieldName in Table&lt;/P&gt;&lt;P&gt;if(isnull(FieldName),'NULL','Not NULL') AS 'N_' &amp;amp; FieldName&lt;/P&gt;&lt;P&gt;Next FieldName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or something similar to that. That would give me a duplicate set of Dimensions with only Null and Not Null as values, instead of the thousands they currently contain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The next part of this is charting and coloring this - I will create one chart per Dimension, and we have hundreds over many tables, so this takes a while. The goal is to copy them and change AS LITTLE AS POSSIBLE in each chart to make it work correctly. Currently, I change the Dimension (easy, drag and drop replace), but the color has to be modified. I use a colormix1([Dimension],color1,color2) since it allowed me to double-click the [Dimension] and copy past the name from the title block of the chart. Is there a better way to do this part, too? What about something that automatically pulls the [Dimension] name from another chart value, like title, [Dimension], data, etc?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is a better way to get these metrics, including restructuring the data, I'm all ears. Thanks in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2021 15:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Dynamic-Field-Names-in-Load-Script-Dynamic-Coloring-in-Chart/m-p/1287456#M27064</guid>
      <dc:creator />
      <dc:date>2021-12-22T15:42:54Z</dc:date>
    </item>
  </channel>
</rss>

