<?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: Limiting coordinates on a scatter chart using nested if statements in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Limiting-coordinates-on-a-scatter-chart-using-nested-if/m-p/1709013#M725158</link>
    <description>&lt;P&gt;I am able to render anything &amp;gt; 4.02 and anything within the range of 4.02 to -4.02 but anything that is beyond -4.02 doesn't work and keeps its original value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;=if(max({&amp;lt;PeriodHalf=&amp;gt;}PeriodHalf)='1',


if(if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='RL',ShotTargetX)&amp;gt;4.02,4.02,
if((if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='LR',-ShotTargetX))&amp;lt;-4.02,-4.02,


if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='RL',ShotTargetX,
if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='LR',-ShotTargetX))))

,

if(max({&amp;lt;PeriodHalf=&amp;gt;}PeriodHalf)='2',


if(if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='RL',-ShotTargetX)&amp;lt;-4.02,-4.02,
if((if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='LR',ShotTargetX))&amp;gt;4.02,4.02,


if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='RL',-ShotTargetX,
if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='LR',ShotTargetX))))

)
)&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 08 Jun 2020 13:14:29 GMT</pubDate>
    <dc:creator>AyCe1082</dc:creator>
    <dc:date>2020-06-08T13:14:29Z</dc:date>
    <item>
      <title>Limiting coordinates on a scatter chart using nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-coordinates-on-a-scatter-chart-using-nested-if/m-p/1708847#M725157</link>
      <description>&lt;P&gt;Hi, I have a working scatter chart that needs to be changed to keep the X coordinates inside a range.&lt;/P&gt;&lt;P&gt;In the screenshot I have a field Event_IDHalf which determines the half in the match and can be 1 or 2. A Direction field which changes per half. The 0 coordinate for X is in the centre in my scatter chart with a range of 4.02 to -4.02. I have to ensure any values that go beyond that is instead showing as the end of the range. I posted a screenshot of my latest attempt at modifying this. I had success earlier with a different version but the - values remained outside the range.&lt;/P&gt;&lt;P&gt;The second part is just the second half and would be a reverse of the first part.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Co-ords.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/35105iBE8C9B754C216B1C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Co-ords.PNG" alt="Co-ords.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-coordinates-on-a-scatter-chart-using-nested-if/m-p/1708847#M725157</guid>
      <dc:creator>AyCe1082</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting coordinates on a scatter chart using nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-coordinates-on-a-scatter-chart-using-nested-if/m-p/1709013#M725158</link>
      <description>&lt;P&gt;I am able to render anything &amp;gt; 4.02 and anything within the range of 4.02 to -4.02 but anything that is beyond -4.02 doesn't work and keeps its original value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;=if(max({&amp;lt;PeriodHalf=&amp;gt;}PeriodHalf)='1',


if(if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='RL',ShotTargetX)&amp;gt;4.02,4.02,
if((if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='LR',-ShotTargetX))&amp;lt;-4.02,-4.02,


if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='RL',ShotTargetX,
if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='LR',-ShotTargetX))))

,

if(max({&amp;lt;PeriodHalf=&amp;gt;}PeriodHalf)='2',


if(if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='RL',-ShotTargetX)&amp;lt;-4.02,-4.02,
if((if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='LR',ShotTargetX))&amp;gt;4.02,4.02,


if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='RL',-ShotTargetX,
if(maxstring({&amp;lt;Direction2=&amp;gt;}Direction2)='LR',ShotTargetX))))

)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Jun 2020 13:14:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-coordinates-on-a-scatter-chart-using-nested-if/m-p/1709013#M725158</guid>
      <dc:creator>AyCe1082</dc:creator>
      <dc:date>2020-06-08T13:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting coordinates on a scatter chart using nested if statements</title>
      <link>https://community.qlik.com/t5/QlikView/Limiting-coordinates-on-a-scatter-chart-using-nested-if/m-p/1718023#M725159</link>
      <description>&lt;P&gt;Figured it out. Aside from removing the need for set analysis using the load script, I had to watch out for QV understandably rendering double negatives as a positive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;=if(Event_IDHalf='1' or Event_IDHalf='2',

if(Direction='RL',

// if playing towards the left goal
if(if(ShotTargetX&amp;gt;0,-ShotTargetX,ShotTargetX)&amp;lt;-4.02,-4.02,
if(if(ShotTargetX&amp;lt;0,ShotTargetX,-ShotTargetX)&amp;gt;4.02,4.02,
if(ShotTargetX&amp;lt;0,ShotTargetX, -ShotTargetX)))
	  
	  ,
	  
// if playing towards the Right goal	  
if(if(ShotTargetX&amp;lt;0,ShotTargetX,ShotTargetX)&amp;lt;-4.02,-4.02,
if(
	if(ShotTargetX&amp;gt;0,ShotTargetX)&amp;gt;4.02,4.02,
	
	 if(ShotTargetX&amp;lt;0,-ShotTargetX, ShotTargetX)))
	  
	))&lt;/LI-CODE&gt;&lt;P&gt;I was looking to delete this thread but I saw no option. If it helps someone in future then that's great because this was a nightmare for me!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 17:27:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Limiting-coordinates-on-a-scatter-chart-using-nested-if/m-p/1718023#M725159</guid>
      <dc:creator>AyCe1082</dc:creator>
      <dc:date>2020-06-11T17:27:22Z</dc:date>
    </item>
  </channel>
</rss>

