6 Replies Latest reply: Oct 17, 2013 1:31 AM by jagan mohan rao appala RSS

    Current quarter in bar chart


      Hi All,

       

      I am using below expression for calcution in bar chart. But I want to show only current quarter. Please suggest how to achieve the same.

       

      Expression:

       

      Count

       

      ({$<Account_Table_Pulse.Responded={'Yes'},Account_Table_Pulse.Q2_Score={6,7},Quarter={$(=only(Quarter))}>}Account_Table_Pulse.Responded)/Count({$<Account_Table_Pulse.Responded={'Yes'},Quarter={$(=only(Quarter))>}Account_Table_Pulse.Responded)

       

       

      No data message is displaying with above expression, where dimension is Quarter.

       

      Any help will be appreciated!

       

      Thanks,

      Ankita

        • Re: Current quarter in bar chart
          Tresesco B

          If you mean current selecetion is your current quarter, then remove the " Quarter={$(=only(Quarter)) " from the set and try.

            • Re: Current quarter in bar chart

              Thanks for reply!

               

              In my application I hv default selection of current year and quarter.
              Secondly, I have to prepare 3 bar charts with same above mentioned expression. In these charts 1 will show current year and quarter, 2nd will show current year and previous quarter, 3rd will show current year and previous of previous quarter.

               

              Thanks!

                • Re: Current quarter in bar chart
                  Tresesco B

                  Please share your sample app so that the data format can be understood and solved faster. Otherwise, this loop of questioning would be longer.

                    • Re: Current quarter in bar chart

                      I got solution

                       

                      I have taken value as Quarter={'Q1'} and so on on 3 charts and exculded Month and Day selection.

                       


                      Now could you help me reflect always current year and quarter selection in the calendar.

                       

                      Note : I am using .qvc component calendar.

                        • Re: Current quarter in bar chart
                          jagan mohan rao appala

                          Hi,

                           

                          If you want to change the quarters based on the current period, then you have use the dynamic expressions like this, your expressions are hard coded, so the quarters won't change dynamically.

                           

                          If you have Date Dimension in your datamodel then use like this

                           

                          Current Quarter:

                          =Sum({<Year=, Month=, Quarter=, DateDimension={'>=$(=QuarterStart(Today()))<=$(=Today())'}>} Sales)

                           

                          Previous Quarter:

                          =Sum({<Year=, Month=, Quarter=, DateDimension={'>=$(=QuarterStart(Today(), -1))<=$(=QuarterEnd(Today(), -1))'}>} Sales)

                           

                          2nd Previous Quarter:

                          Previous Quarter:

                          =Sum({<Year=, Month=, Quarter=, DateDimension={'>=$(=QuarterStart(Today(), -2))<=$(=QuarterEnd(Today(), -2))'}>} Sales)

                           

                          Hope this helps you.

                          Regards,

                          Jagan.

                  • Re: Current quarter in bar chart
                    jagan mohan rao appala

                    Hi,

                     

                    If you have Date Dimension in your datamodel then use like this

                     

                    Current Quarter:

                    =Sum({<Year=, Month=, Quarter=, DateDimension={'>=$(=QuarterStart(Today()))<=$(=Today())'}>} Sales)

                     

                    Previous Quarter:

                    =Sum({<Year=, Month=, Quarter=, DateDimension={'>=$(=QuarterStart(Today(), -1))<=$(=QuarterEnd(Today(), -1))'}>} Sales)

                     

                    2nd Previous Quarter:

                    Previous Quarter:

                    =Sum({<Year=, Month=, Quarter=, DateDimension={'>=$(=QuarterStart(Today(), -2))<=$(=QuarterEnd(Today(), -2))'}>} Sales)

                     

                    Hope this helps you.

                     

                    Regards,

                    Jagan.