1 Reply Latest reply on Mar 2, 2016 9:30 PM by Shinichiro Murakami

    Calulating Previous Quarter Values Without Using Parameters

    Nakul Bhadoria

      I have a requirement where I need to display let say Sales for Current Qtr & Previous Qtr in the same view...with a option (qtr + Yr drop down) to user to select which option they want to select and based on the selection values gets populated.

       

      I am unable to do it with out using parameters.

       

      Please see the attached excel sheet for better understanding of the kind of data and report requirements.

       

      Please let me know if any expert found any work around...but it has to be without using parameters as they don't update automatically.

      Please tableau provide us dynamic parameters...PLZZZZZZZZZZZZZZZZZZZZZZZZZZZ !!!!!!

        • 1. Re: Calulating Previous Quarter Values Without Using Parameters
          Shinichiro Murakami

          Nakul,

           

          Here is my approach.

           

          [Qaurter_2]

          str([Year])+"Q"+str(datepart('quarter',([Date])))

           

          [Year]

          str(Year([Date]))

           

          /// [Year] is greater than or equal to 2nd max Year  & // [Quarter 2] is greater than or equal to 2nd max[Qaurter_2] ///

          [Header]  

          if [Year/Qtr Select] ="Year" and [Year] >= {fixed :max(if [Year]<>{fixed :max([Year] )} 

          then [Year] end)} then ([Year])

          elseif [Year/Qtr Select] ="Quarter" and [Qaurter_2] >= {fixed :max(if [Qaurter_2] <>{fixed :max([Qaurter_2])}

          then [Qaurter_2]end)} then [Qaurter_2]  

          end

           

          Then put "Header" to Rows and filter and filter out "Null".

           

           

          Now according to the parameter, the header dynamically changes.

           

           

          Thanks,

          Shin

           

           

          9.0 attached