<?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: creating variables in load editor in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/creating-variables-in-load-editor/m-p/1793504#M62132</link>
    <description>&lt;P&gt;It sounds like you only need one variable here, which toggles between Count and Revenue. You can do this using a variable, e.g.&lt;/P&gt;&lt;P&gt;Let vButton = 'Count'; // If revenue is the default, change to revenue&lt;/P&gt;&lt;P&gt;You would then add a button which toggles vButton to Revenue (if it's count) or Count (if it's Revenue) using a simple If() statement.&lt;/P&gt;&lt;P&gt;In your objects, you would probably be best off using an if() statement in a single measure - if(vButton =&amp;nbsp; 'Count',CountFormulaHere,RevenueFormulaHere), but you could also use calculation conditions on two measures if you prefer - if(vButton=Count,1,0) and if(vButton=revenue,1,0) respectively.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Mar 2021 20:11:22 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2021-03-22T20:11:22Z</dc:date>
    <item>
      <title>creating variables in load editor</title>
      <link>https://community.qlik.com/t5/App-Development/creating-variables-in-load-editor/m-p/1793262#M62102</link>
      <description>&lt;P&gt;Hi, I'm new to scripting in qlik sense.&lt;/P&gt;&lt;P&gt;I actually need to create 2 buttons: one is 'conversion count'&amp;nbsp; which makes conversion count as a measure for all the bar charts in my dashboard&amp;nbsp;&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;conversion count&amp;nbsp; =Count( ID) - Count(&amp;lt;Conversion_MONTH={'NC'}&amp;gt;}ID) has this formula (here conversion month and ID are the columns already present in my table) and the second button should be 'revenue' which makes the measure as 'revenue' for all the bar charts in my dashboard&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;revenue = sum(total_ revenue)..(here total_revenue column is already present in my data)&lt;/P&gt;&lt;P&gt;So to create these buttons I need to first create variables in the load editor and then make changes in the measure and change it's condition to if -else&lt;/P&gt;&lt;P&gt;but how do I do this exactly? please help.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 09:08:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-variables-in-load-editor/m-p/1793262#M62102</guid>
      <dc:creator>aditi_haldule</dc:creator>
      <dc:date>2021-03-22T09:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: creating variables in load editor</title>
      <link>https://community.qlik.com/t5/App-Development/creating-variables-in-load-editor/m-p/1793504#M62132</link>
      <description>&lt;P&gt;It sounds like you only need one variable here, which toggles between Count and Revenue. You can do this using a variable, e.g.&lt;/P&gt;&lt;P&gt;Let vButton = 'Count'; // If revenue is the default, change to revenue&lt;/P&gt;&lt;P&gt;You would then add a button which toggles vButton to Revenue (if it's count) or Count (if it's Revenue) using a simple If() statement.&lt;/P&gt;&lt;P&gt;In your objects, you would probably be best off using an if() statement in a single measure - if(vButton =&amp;nbsp; 'Count',CountFormulaHere,RevenueFormulaHere), but you could also use calculation conditions on two measures if you prefer - if(vButton=Count,1,0) and if(vButton=revenue,1,0) respectively.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 20:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-variables-in-load-editor/m-p/1793504#M62132</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-03-22T20:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: creating variables in load editor</title>
      <link>https://community.qlik.com/t5/App-Development/creating-variables-in-load-editor/m-p/1793562#M62142</link>
      <description>&lt;P&gt;ok. I'll try this.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 05:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-variables-in-load-editor/m-p/1793562#M62142</guid>
      <dc:creator>aditi_haldule</dc:creator>
      <dc:date>2021-03-23T05:24:37Z</dc:date>
    </item>
  </channel>
</rss>

