<?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: To convert SQL Query into Expression for Bar Chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705921#M1057221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No you can put the SQL Query in xpression. With the SQL Query you can load data via QVScript, build the DATA MODEL and build the expression based the data model in the Qlikiew objects like Chart, Text Box etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Oct 2014 18:04:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-11T18:04:31Z</dc:date>
    <item>
      <title>To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705912#M1057212</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;I am trying to find a approach to write chart level expression based on below given SQL query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT COUNT(OBJ.ENTER_DT), &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;ROUND(ABS(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;ENTER_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;- &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;CLOSE_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;)/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: maroon; background: white;"&gt;30&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: maroon; background: white;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;) &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: olive; background: white;"&gt;AVG_MONTHS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;TO_CHAR((TO_DATE(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;CLOSE_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: red; background: white;"&gt;'MON-YYYY'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;) &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: olive; background: white;"&gt;MONTH&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM OBJECT OBJ&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt; OBJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;P_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt; CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;BETWEEN&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: red; background: white;"&gt;'01-JAN-2014'&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: red; background: white;"&gt;'30-SEP-2014'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt; OBJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;ENTER_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;BETWEEN&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;P_DATE_FROM &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;P_DATE_TO;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Request your help to convert the sql query into a chart level expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 04:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705912#M1057212</guid>
      <dc:creator>ankurakash</dc:creator>
      <dc:date>2014-10-11T04:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705913#M1057213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Akash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Convert your SQL Query to QVD and link this table to master table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then ,take this field as your expression. Eg : count(your filed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 06:13:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705913#M1057213</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2014-10-11T06:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705914#M1057214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your question looks incomplete.... Kindly provide some information about what type of chart you want to create....&lt;/P&gt;&lt;P&gt;You can directly write SQL Query to your Script and after running the script all fields would be available to use in QV Apps...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 07:44:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705914#M1057214</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-10-11T07:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705915#M1057215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at high level&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create the Oracle OLE DB Connection(check whether you have the Oracle OLEDB Driver installed)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Load the raw data&amp;nbsp; in&amp;nbsp; Qlikview by scripting&lt;/P&gt;&lt;P&gt;for eg&lt;/P&gt;&lt;P&gt;STATS:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT OBJ.ENTER_DT as enter_dt,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;CLOSE_DT, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM OBJECT OBJ&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt; OBJ&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;P_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; background-position: initial;"&gt; CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: blue; background-position: initial;"&gt;BETWEEN&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: red; background-position: initial;"&gt;'01-JAN-2014'&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: red; background-position: initial;"&gt;'30-SEP-2014'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt; OBJ&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;ENTER_DT &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;BETWEEN&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;P_DATE_FROM &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;P_DATE_TO;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Note: you have to pass the correct date(format) in the where&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;3. Create a Dimension as Month and then create the expressions for count and Average.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope it helps, &lt;/P&gt;&lt;P&gt;-Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 07:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705915#M1057215</guid>
      <dc:creator />
      <dc:date>2014-10-11T07:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705916#M1057216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. I have the QVD for the table "OBJECT" which is the Master table.&lt;/P&gt;&lt;P&gt;Based on this QVD, I need to define the expression in Bar chart to get the required values.&lt;/P&gt;&lt;P&gt;For ex. for the query, "&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;ROUND(ABS(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;ENTER_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;- &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;CLOSE_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;)/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: maroon; background: white;"&gt;30&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: maroon; background: white;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;) &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: olive; background: white;"&gt;AVG_MONTHS " how I would be defining the expression at Bar chart level instead of script level.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: olive; background: white; font-size: 10.0pt; font-family: Courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: olive; background: white; font-size: 10.0pt; font-family: Courier;"&gt;Regards..&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 14:11:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705916#M1057216</guid>
      <dc:creator>ankurakash</dc:creator>
      <dc:date>2014-10-11T14:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705917#M1057217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to define the expression for Bar chart instead of defining it at script level. Is there a way that allows me to convert the SQL query into report level expression like the one I have stated in my post?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 14:16:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705917#M1057217</guid>
      <dc:creator>ankurakash</dc:creator>
      <dc:date>2014-10-11T14:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705918#M1057218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your suggested points..&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; The DB connection string exists.&lt;/P&gt;&lt;P&gt;2) I have fetched all the required table and stored it in the QVD format in one application.&lt;/P&gt;&lt;P&gt;3) Would request to know if I can define the posted SQL query as expression in bar chat instead of using in script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 14:24:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705918#M1057218</guid>
      <dc:creator>ankurakash</dc:creator>
      <dc:date>2014-10-11T14:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705919#M1057219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Dear Akash,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm saying Convert your Below query as a QVD.Like&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Query :&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SELECT&amp;nbsp;&amp;nbsp; COMP_CODE, COUNT(OBJ.ENTER_DT), &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;ROUND(ABS(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;ENTER_DT &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;- &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;CLOSE_DT&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;)/&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: maroon; background-position: initial;"&gt;30&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: maroon; background-position: initial;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: olive; background-position: initial;"&gt;AVG_MONTHS&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; background-position: initial;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; background-position: initial;"&gt;TO_CHAR((TO_DATE(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: black; background-position: initial;"&gt;CLOSE_DT&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; background-position: initial;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: red; background-position: initial;"&gt;'MON-YYYY'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; background-position: initial;"&gt;) &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: olive; background-position: initial;"&gt;MONTH&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM OBJECT OBJ&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt; OBJ&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;P_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; background-position: initial;"&gt; CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: blue; background-position: initial;"&gt;BETWEEN&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: red; background-position: initial;"&gt;'01-JAN-2014'&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; color: red; background-position: initial;"&gt;'30-SEP-2014'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 'Courier New'; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt; OBJ&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;ENTER_DT &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;BETWEEN&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;P_DATE_FROM &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: blue; background-position: initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;P_DATE_TO;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;STORE Query into D:\Query.QVD;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;Drop Table Query;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;After loading this you will get fields in QVD as COMP_CODE ,Month....&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;Link this table to Master Table by COMP_CODE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;Take Dimension in your chart from master table and write your expression Count(your field)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;Try this procedure.If you have any doubts let me know.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;Krishna&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Courier; color: black; background-position: initial;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 15:40:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705919#M1057219</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2014-10-11T15:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705920#M1057220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can write like this to get absolute number and round to 2 digits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=ROUND(FABS(ENTER_DT - CLOSE_DT)/30,0.2)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 16:19:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705920#M1057220</guid>
      <dc:creator />
      <dc:date>2014-10-11T16:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705921#M1057221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ankur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No you can put the SQL Query in xpression. With the SQL Query you can load data via QVScript, build the DATA MODEL and build the expression based the data model in the Qlikiew objects like Chart, Text Box etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 18:04:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705921#M1057221</guid>
      <dc:creator />
      <dc:date>2014-10-11T18:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705922#M1057222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;read the data from your db &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;QlikTable:&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;ENTER_DT,&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;CLOSE_DT&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="line-height: 1.5em; font-size: 12.7272720336914px;"&gt;FROM OBJECT OBJ&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="line-height: 1.5em; font-size: 12.7272720336914px;"&gt;WHERE&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 12.7272720336914px; line-height: 1.5em;"&gt;&lt;EM&gt;&lt;SPAN style="color: #000000; font-family: Courier; font-size: 10pt; font-weight: inherit; background-position: initial;"&gt;CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 10pt; font-weight: inherit; color: blue; background-position: initial;"&gt;BETWEEN&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Courier; font-size: 13.63636302948px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 10pt; font-weight: inherit; color: red; background-position: initial;"&gt;'01-JAN-2014'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Courier; font-size: 13.63636302948px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier; font-size: 10pt; font-weight: inherit; color: blue; background-position: initial;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Courier; font-size: 13.63636302948px;"&gt; &lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="font-family: Courier; font-size: 10pt; font-style: inherit; font-weight: inherit; color: red; background-position: initial;"&gt;&lt;EM&gt;'30-SEP-2014'&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 12.7272720336914px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 12.7272720336914px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 12.7272720336914px; line-height: 1.5em;"&gt;then add&amp;nbsp; a bar chart&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 12.7272720336914px; line-height: 1.5em;"&gt;dimension&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; month(CLOSE_DT) &amp;amp; '-' &amp;amp; year(CLOSE_DT)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 12.7272720336914px; line-height: 1.5em;"&gt;expression&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;fabs(ENTER_DT - CLOSE_DT)&lt;/SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 12.7272720336914px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Oct 2014 21:41:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705922#M1057222</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-10-11T21:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705923#M1057223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the step by step solution. Your solution is helping me to come close to the desired result.&lt;/P&gt;&lt;P&gt;I would request your guidelines in one of the issue I am facing in getting the data correctly(in sequence) for my report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The scenario is: The SQL query for which I have created the QVD also contains the Group By Clause where field "CLOSE_DT" is first converted to date and then to character using TO_CHAR function - Syntax posted below:&lt;/P&gt;&lt;P&gt;SELECT COUNT(OBJ.ENTER_DT), &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;ROUND(ABS(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;ENTER_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;- &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;CLOSE_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;)/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: maroon; background: white;"&gt;30&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: maroon; background: white;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;) &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: olive; background: white;"&gt;AVG_MONTHS&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;TO_CHAR((TO_DATE(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;CLOSE_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: red; background: white;"&gt;'MON-YYYY'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;) &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: olive; background: white;"&gt;MONTH&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM OBJECT OBJ&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt; OBJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;P_DATE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt; CLOSE_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;BETWEEN&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: red; background: white;"&gt;'01-JAN-2014'&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: red; background: white;"&gt;'30-SEP-2014'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt; OBJ&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;ENTER_DT &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;BETWEEN&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;P_DATE_FROM &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;AND&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;P_DATE_TO;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;GROUP&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;BY&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;TO_CHAR((TO_DATE(&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: black; background: white;"&gt;CLOSE_DT&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: red; background: white;"&gt;'MON-YYYY'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;Now, when I create the report taking "MONTH" as Dimension, the sequence of month is coming in alphabetical order i.e. they are not coming in sequence.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;Look forward for your response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Courier; color: blue; background: white;"&gt;Regards..&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 01:02:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705923#M1057223</guid>
      <dc:creator>ankurakash</dc:creator>
      <dc:date>2014-10-15T01:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705924#M1057224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Akash,&lt;/P&gt;&lt;P&gt;Please attach a sample file, which the query loaded as QVD .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 04:54:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705924#M1057224</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2014-10-15T04:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705925#M1057226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample data and attachment is shared as below:&lt;/P&gt;&lt;P&gt;1) I have a field "&lt;STRONG&gt;CLOSE_DT&lt;/STRONG&gt;" under table "OBJ" on which Master Calendar is created based on the below given field in both the tables:&lt;/P&gt;&lt;P&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;&amp;nbsp; Year(CLOSE_DT) &amp;amp; '-' &amp;amp; Month(CLOSE_DT) as Key,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Please consider anything after double forward slash "//" as the comment area&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Master Calendar has following fields:&lt;/P&gt;&lt;P&gt;Key&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;//&lt;/STRONG&gt; On which table OBJ is connected&lt;/P&gt;&lt;P&gt;Year &lt;STRONG&gt;//&lt;/STRONG&gt; On On which table CLOSEOBJ_QUERY is connected&amp;nbsp; (Creating Synthetic Key)&lt;/P&gt;&lt;P&gt;Month &lt;STRONG&gt;//&lt;/STRONG&gt; On which table CLOSEOBJ_QUERY is connected (Creating Synthetic Key) - Image shared above point2):&lt;/P&gt;&lt;P&gt;Quarter&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" height="166" src="https://community.qlik.com/legacyfs/online/69115_pastedImage_2.png" style="width: 317.01px; height: 166px;" width="317" /&gt;&lt;/P&gt;&lt;P&gt;2) Here, I created the report as per your suggestion: I generated a QVD based on the below given query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSEOBJ_QUERY:&lt;/P&gt;&lt;P&gt;SELECT SUM(ROUND(ABS(ENTER_DT-CLOSE_DT)/30,2))/COUNT(*) AVG_MONTHS,&lt;/P&gt;&lt;P&gt;TO_CHAR((TO_DATE(CLOSE_DT)),'MON') Month,TO_CHAR((TO_DATE(CLOSE_DT)),'YYYY') Year&lt;/P&gt;&lt;P&gt;FROM OBJ&lt;/P&gt;&lt;P&gt;WHERE CLOSE_DT IS NOT NULL&lt;/P&gt;&lt;P&gt;GROUP BY TO_CHAR((TO_DATE(CLOSE_DT)),'MON'),TO_CHAR((TO_DATE(CLOSE_DT)),'YYYY');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;store CLOSEOBJ_QUERY into [$(path)\CLOSEOBJ_QUERY.QVD];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE&amp;nbsp; CLOSEOBJ_QUERY;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) At Script level, I called the newly created table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSEOBJ_QUERY:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD AVG_MONTHS,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MONTH as Month,&amp;nbsp;&amp;nbsp;&amp;nbsp; // Renaming it to Month so Master Calendar can be connected&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YEAR as Year&amp;nbsp;&amp;nbsp;&amp;nbsp; // Renaming it to Year so Master Calendar can be connected&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\Data\QVD\CLOSEOBJ_QUERY.QVD]&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Here in the above script I have requirement of both the fields - Month and Year as Dimension for my report generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) At report level, I have tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line Chart Properties -&amp;gt;&lt;/P&gt;&lt;P&gt;Dimension -&amp;gt; Month; Year&lt;/P&gt;&lt;P&gt;Expression -&amp;gt; =SUM(AVG_MONTHS)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) I get the desired result in my report but face two issues also depicted in the attached image:&lt;/P&gt;&lt;P&gt;a) Master Calendar - month is redundant and out of order&amp;nbsp; // It is concatenating no. of months in the "Month" section in sheet area.&lt;/P&gt;&lt;P&gt;b) I am not getting proper sequence of month while depicting the line chart. Image attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.qlik.com/legacyfs/online/69113_pastedImage_0.png" style="width: 620px; height: 259px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Request your guidance in resolving this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 16:18:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705925#M1057226</guid>
      <dc:creator>ankurakash</dc:creator>
      <dc:date>2014-10-16T16:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705926#M1057228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ram,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for responding. I am getting close to the desired result by creating QVD of the query and currently stuck in getting the report to be sync with the Calendar. For the same I have posted a reply to Krishna who is guiding me in fixing the issue. I look forward for your guidelines and approach to fix the current issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2014 16:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705926#M1057228</guid>
      <dc:creator>ankurakash</dc:creator>
      <dc:date>2014-10-16T16:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: To convert SQL Query into Expression for Bar Chart</title>
      <link>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705927#M1057229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ankur ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't find any attachment with this thread.&lt;/P&gt;&lt;P&gt;Please answer for my doubts from your app.&lt;/P&gt;&lt;P&gt;1.Have you resolved the synthetic issue? If not resolve it ,by giving alias name to Month and Year.&lt;/P&gt;&lt;P&gt;2.If you got months in sequence&amp;nbsp; will you&amp;nbsp; reach your point??&lt;/P&gt;&lt;P&gt;3.Make sure the file has attached such that me or some one will reply you soon to resolve this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2014 05:46:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-convert-SQL-Query-into-Expression-for-Bar-Chart/m-p/705927#M1057229</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2014-10-17T05:46:57Z</dc:date>
    </item>
  </channel>
</rss>

