3 Replies Latest reply: Jul 29, 2013 3:45 PM by Norman LaCroix RSS

    Multiple Columns from a Single Expression

    Norman LaCroix

      Is there a way to populate in a straight chart, using a single expression, multiple columns, each column representing a different Period (e.g. Month). For example, in the month of March, I want the user to see 3 columns of data (January, February and March). In the month of April, I want the user to see 4 columns of data (January, February, March and April). And so on through December, when there would be 12 columns. Right now I am using using 12 expressions in order to populate all 12 months of data, which is fine if it is December, but not if it is March, since I don't want to see the 12 trailing months from March back - just 3 months. So what I am looking for is an expression that considers that period variability. Here are the expressions that I am currently using:

       

      =sum({<BillTranDate={">=$(=TimeStamp(MonthStart(vEndDate,0)))<=$(AddMonths(vEndDate,0)))"}>}BillFeeAmt)  [Current Month]       

      =sum({<BillTranDate={">=$(=TimeStamp(MonthStart(vEndDate,-1)))<=$(AddMonths(vEndDate,-1)))"}>}BillFeeAmt  [Prior Month]  and so on .

       

      Thank you                                 

        • Re: Multiple Columns from a Single Expression

          Can you use the dimension Month and use set analysis on your expression  to have info only for the current year (you can store the year number in a variable)?

          vYear= Year(Today())

            • Re: Multiple Columns from a Single Expression

              Or use a flag on your master calendar with current year and then
              SUM({<CurYrFlag = {1}>}BillFeeAmt)
              This will only show you Month as a dimension for the months in the current year, and only for those that have values
              Hope any of this helps
              Regards,

               

               

               

              Pablo

                • Re: Multiple Columns from a Single Expression
                  Norman LaCroix

                  Thank you for these suggestions, Pablo. I'll try them.

                   

                  Date: Mon, 29 Jul 2013 13:10:47 -0400

                  From: qcwebmaster@qlik.com

                  Subject: - Re: Multiple Columns from a Single Expression

                  To: nlacroix@optonline.net

                   

                   

                   

                   

                   

                   

                        

                             

                                  

                   

                                       

                   

                                            

                                                 

                                                      

                                                           

                                                                

                                                               QlikCommunity

                                                           

                   

                                                      

                                                      

                                                           

                      Re: Multiple Columns from a Single Expression

                   

                   

                      created by Pablo Abayian in Development (QlikView Desktop) - View the full discussion

                   

                   

                   

                  Or use a flag on your master calendar with current year and then

                  SUM({}BillFeeAmt)

                  This will only show you Month as a dimension for the months in the current year, and only for those that have values

                  Hope any of this helps

                  Regards,

                     Pablo

                   

                   

                   

                       Reply to this message by replying to this email -or- go to the message on QlikCommunity

                   

                       Start a new discussion in Development (QlikView Desktop) by email or at QlikCommunity

                                                                                                  © 1993-2011 QlikTech International AB   

                               

                              Copyright & Trademarks | Privacy | Terms of Use | Software EULA