3 Replies Latest reply: Jul 22, 2013 12:23 PM by Sabahath Khan RSS

    Need help with Quarter Calculations



      I am new to Qlikview and learning the ropes. I am kind of stumped on this issue and was hoping someone can help me out.


      I have a scenario where i Have a table with patients, disease and date. The requirement is to display count of patients in a bar chart by disease as a stacked bar by Quarter Year for current and last 3 quarters based on year and month selected.


      The issue is i have created a master calendar and was able to get quarter year and was able to get last 3 quarter values using the following expression

      Count({<YearQuarterID= {"<=$(=max(YearQuarterID)) >$(=max(YearQuarterID)-4) "}, Year=, Month=, Date=>} [Patient ID])


      Now i was informed I need not aggreate the months values in a QTR but display the values for the last month in each quarter. So if some one selects Year = 2013, Month = Feb. The chart should display Q1 13 with Feb count value as one bar followed by Q4 12 with Dec 12 count value and so on...


      Anyone have any ideas how we can do this? Or get the count of the last month of the quarter in which the month selected falls in?