6 Replies Latest reply on Jul 20, 2016 4:23 AM by Michael Hesser

    Filter areas away from timeline

    Niko Suomi

      Hello,

       

      I have fought a whole day with a problem, and I am pulling my hair out of my head..

       

      Is it possible in ANY WAY to filter away the AREA's that does not have date for the date parameter value that I have selected?

       

      In the picture below, I have managed to only filter the certain date and area to it's own .. But I really want it to filter that lowest away and keept the first NULL and AREA1 ('cause they are the same AREA1)...

      I just have not figured out how to filter those areas away, that does not have the date parameter value I have selected.

       

      Just filtering the one date from area that has it, and leaves the other to null.. This is making me sad..

      Any ideas from anyone? Would be so much help to me at this point..

       

       

       

      Untitled.png

       

      Cheers,

      Niko

        • 1. Re: Filter areas away from timeline
          Michael Hesser

          Hello Niko;

          Can you share a small .twbx of anonymous data with us? I'm not sure I quite grasp what you're after: while it seems like you have two Null values, there must be some variable that distinguishes the first from the second.

           

          The order is a little suspicious, too... do you have a calculation setting a field to "Null" (the string), rather than NULL (the absence of a value) ?

           

          Let us know!

          • 2. Re: Filter areas away from timeline
            Niko Suomi

            Hello,

             

            here is an simple attachment with a simple script .. I did throw all it away yesterday, but this should simply demonstrate my problem.

             

            So there is a calcfield named "Filter only those who have dates param select" and I do not know how to make this work :/

            At the moment it simply checks if month is same that the selected in the parameter and then KPI .. So that is why others values drop to NULL.

             

            But this is the trigger, where I want to filter those KPI:s out, who do not have the value on the selected month and keep others.

            And still be able to show the whole timeline, without the sliced dot and timeline. Is this possible?

             

            There is other field called L12N6 that filters last 12 months and next 6 months to the view.

            Maybe these have to be unified to one field?

             

             

             

            Cheers,

            Niko

            • 3. Re: Filter areas away from timeline
              Niko Suomi

              So simply put I am trying to achieve:

               

              If the KPI has the [Order date] value that we have chosen in the parameter [MonthSelector] then show the KPI and the timeline 12 months back and 6 months up.

               

               

               

              Cheers,

              Niko

              • 4. Re: Filter areas away from timeline
                Michael Hesser

                Hi Niko;

                 

                Please see if this is what you're after. I can't promise that it's clean coding, but it may help you out.

                 

                Here's what I did.

                I created a calculation to determine if your subcategory had any sales within the selected month.

                Note: I'm only using [Sales] to determine if a subcategory is displayed. If you had 0 sales, but qty sold was a non-zero, you may get abnormal results.

                 

                I dropped this on the FILTERS and made sure the value was always >0 and excluded NULLS

                 

                I moved your equation for L12N6 onto the Filters, rather than as a Column, making sure it was still marked as TRUE.

                 

                I also created a couple of little calcs to show the start and end of the selected month:

                 

                Then I used these to create a Reference band and line so the user can get an idea of when & where the Sales took place.

                *Note: since your sales are summed by MONTH, I don't think the band is accurate: if you select Jan 1, 2014, the band will extend from Jan 1, /2014 to Feb 1, 2014, but all your Jan sales are aggregated at Jan 1, 2014. You probably want to remove the band -or- adjust it.

                 

                Please take a look and see if this is what you're after! Good luck!

                • 5. Re: Filter areas away from timeline
                  Niko Suomi

                  Hi,

                   

                  This actually helped me! Only for the 0 i decided to put NULL, then I got it to work the way I needed

                   

                   

                   

                  Cheers,

                  Niko