title: If one value is null get previous value in that quarter, in sql select query
body: <p>I have data as shown below,</p>
  
  <p><a href="https://i.stack.imgur.com/eb0i5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eb0i5.png" alt="enter image description here"></a></p>
  
  <p>Now i want to get result as ,</p>
  
  <pre><code>DateDisplayName  Active
  Q2(Jun)-2015     736
  Q3(Sep)-2015     734
  Q4(Dec)-2015     NULL
  Q1(Mar)-2016     NULL
  </code></pre>
  
  <p>So if last month data is null in that quarter then get last but one data.
  Ex: in Q3 Active is null for Sep so i shoul show Aug data.</p>