<?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: Variable not working in a background color set anlysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14344#M770996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Akshaya suggested to use = in your variable. Just follow the same, like create another variable using Ctrl+Alt+V then add then give a variable name vMaxMonthYear then type in below expr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Max(Date(Created, 'MMM-YYYY'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your variable will hold max month. Then in your chart expression background use below expr:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(WeekYear = MaxString({&amp;lt;WeekYear={'$(vMaxWeekYear)'}&amp;gt;}WeekYear) OR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthYear = '$(vMaxMonthYear)',lightgreen())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you should see green for the bars with Max Week and MonthYear when you switch your cyclic dimensions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 May 2018 04:54:32 GMT</pubDate>
    <dc:creator>vishsaggi</dc:creator>
    <dc:date>2018-05-28T04:54:32Z</dc:date>
    <item>
      <title>Variable not working in a background color set anlysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14340#M770992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to display color on a bar chart. to be more specific, my bar chart is sorted by weeks and i'm trying to display color on the latest week (i'm using a master calendar which you can see here&lt;/P&gt;&lt;P&gt;QuartersMap:&amp;nbsp; &lt;/P&gt;&lt;P&gt;MAPPING LOAD&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;rowno() as Month,&amp;nbsp; &lt;/P&gt;&lt;P&gt;'Q' &amp;amp; Ceil (rowno()/3) as Quarter&amp;nbsp; &lt;/P&gt;&lt;P&gt;AUTOGENERATE (12);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Temp:&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load&amp;nbsp; &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; min(Created) as minDate,&amp;nbsp; &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; max(Created) as maxDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident MyTable1;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let varMinDate = Num(Peek('minDate', 0, 'Temp'));&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));&amp;nbsp; &lt;/P&gt;&lt;P&gt;DROP Table Temp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;TempCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &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; $(varMinDate) + Iterno()-1 As Num,&amp;nbsp; &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; Date($(varMinDate) + IterNo() - 1) as TempDate&amp;nbsp; &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; AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;MasterCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;Load&amp;nbsp; &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; TempDate as Created,&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(TempDate) As Year,&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; WeekYear(TempDate) &amp;amp; '-' &amp;amp; Num(Week(weekstart(TempDate)),'00') as WeekYear,&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; Month(TempDate) As Month,&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;&amp;nbsp; &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; Day(TempDate) As Day,&amp;nbsp; &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; YeartoDate(TempDate)*-1 as CurYTDFlag,&amp;nbsp; &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; YeartoDate(TempDate,-1)*-1 as LastYTDFlag,&amp;nbsp; &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; inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12,&amp;nbsp; &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; date(monthstart(TempDate), 'MMM-YYYY') as MonthYear,&amp;nbsp; &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; ApplyMap('QuartersMap', month(TempDate), Null()) as Quarter,&amp;nbsp; &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; WeekDay(TempDate) as WeekDay&amp;nbsp; &lt;/P&gt;&lt;P&gt;Resident TempCalendar&amp;nbsp; &lt;/P&gt;&lt;P&gt;Order By TempDate ASC;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Drop Table TempCalendar;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;).&lt;/P&gt;&lt;P&gt;But the thing is&amp;nbsp; It cannot work properly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="MaxWeekYear.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/203556_MaxWeekYear.PNG" style="height: 417px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;I put the formula in the set analysis background color. But the thing is it doesn't want to display the color &lt;/P&gt;&lt;P&gt;In a text box i put : =$(vMaxWeekYear) and the text box in blue display the data.&lt;/P&gt;&lt;P&gt;But if i put vMaxWeekYear it doesn't display anything&lt;/P&gt;&lt;P&gt;I don't know why&lt;/P&gt;&lt;P&gt;&lt;IMG alt="variable color.PNG" class="jive-image image-2" src="/legacyfs/online/203557_variable color.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This what i put in the script.&lt;/P&gt;&lt;P&gt;Anyway thank you in advance&lt;/P&gt;&lt;P&gt;I attached the file in the description as &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14340#M770992</guid>
      <dc:creator>lessassy</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable not working in a background color set anlysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14341#M770993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;create a variable in which you store the value of the max week&amp;nbsp; (not the text of the function max())&lt;/P&gt;&lt;P&gt;and use this variable in the condition&lt;/P&gt;&lt;P&gt;the problem is present when there is a $() in the formula&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 15:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14341#M770993</guid>
      <dc:creator>olivierrobin</dc:creator>
      <dc:date>2018-05-25T15:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Variable not working in a background color set anlysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14342#M770994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have fixed the color issue and attached is the your updated application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, put "=" before the function in variable "=" in the expression&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Akshaya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS - if you find response as correct and helpful. Please mark it as Correct and Helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 15:59:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14342#M770994</guid>
      <dc:creator>adityaakshaya</dc:creator>
      <dc:date>2018-05-25T15:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Variable not working in a background color set anlysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14343#M770995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Than you it worked !!!&lt;/P&gt;&lt;P&gt;I have another uestion.&lt;/P&gt;&lt;P&gt;I have a cycle group in this chart (weekyear and monthyear). What kind of formula could i use for both of them (to display color for the current month and year)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="cycle group.PNG" class="jive-image image-1" src="/legacyfs/online/203573_cycle group.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2018 21:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14343#M770995</guid>
      <dc:creator>lessassy</dc:creator>
      <dc:date>2018-05-25T21:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Variable not working in a background color set anlysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14344#M770996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Akshaya suggested to use = in your variable. Just follow the same, like create another variable using Ctrl+Alt+V then add then give a variable name vMaxMonthYear then type in below expr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Max(Date(Created, 'MMM-YYYY'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So your variable will hold max month. Then in your chart expression background use below expr:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(WeekYear = MaxString({&amp;lt;WeekYear={'$(vMaxWeekYear)'}&amp;gt;}WeekYear) OR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MonthYear = '$(vMaxMonthYear)',lightgreen())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you should see green for the bars with Max Week and MonthYear when you switch your cyclic dimensions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2018 04:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-not-working-in-a-background-color-set-anlysis/m-p/14344#M770996</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-05-28T04:54:32Z</dc:date>
    </item>
  </channel>
</rss>

