0 Replies Latest reply on Oct 9, 2013 9:32 AM by John Jose

    Issue with data format

    John Jose



      We have following issue with presenting data to the tableau.


      We have data in following format.


      Year     Quarter   value


      2013      Q4           25

      2014      Q1           15.


      Now we want to represent this data as continuous bar with current and previous years.


      e.g. Assume filters are Year and Quarter.


      1) If user is selecting 'All' Years and "All" quarters then there will be two continuous bars because for 2014 previous year is 2013.


      2) If user is selecting 2014 Q1 there will not be any bar for previous year as 2013 Q1 is not available.


      but we found at a time only one condition is achievable we added one for raw to represent previous year data if available


      e.g. For 2014 we can have data like this which will satisfy first condition. (Assume user is selecting 'All' for quarter)  Quarter does not matter.


      Year     Quarter   value  year type        


      2014      Q1           25      previous year      

      2014      Q1           15     selected Year      


      and if we represent like this then it will satisfy condition where user is selecting 2014/Q1. (case 2)


      Year     Quarter   value  year type         


      2014      Q1           0      previous year      

      2014      Q1           15     selected Year 



      So issue here is if user is selecting all Quarters we want to show data for previous whole year.

      If user is selecting quarter filter than we want to do quarter on quarter comparison.


      How to conditionally pick value of column based on selected quarter filter. If 'All' quarters are selected I want to represent "valueifallquartersselected" and if specific value of quarter is selected "Q1" then I want to represent 'value' column on the bar.



      Year     Quarter   value  year type          valueifallquarterselected


      2014      Q1           0      previous year            25

      2014      Q1           15     selected Year           N/A