4 Replies Latest reply on Jan 22, 2019 12:55 PM by Ignacio Laiseca

    Filter calculation by its measures

    Ignacio Laiseca

      After I do a sum using different measures even from different databases I want to be able to filter out the different measures I've used.

      For example, I am trying to calculate the total cost of my company to do this I have

      Database 1: Cost X

      Database 2: Cost Y

      Database 3: Cost Z & A

      And all this databases share a parameter call TIME

      In my Database 3 I do the following calculation:

       

      Total Cost:
      SUM(X)+SUM(Y)+SUM(Z)+SUM(A)

       

      Now I paint a bar graph of the total cost over time.

       

      My problem is here: how do I create a filter so I can filter out the different costs?

      By this I mean a filter where I have [X,Y,Z,A] so I can play and choose which of these to include in my total cost or not, depending on what I want to analyses.

       

      I have tried to explain it as clear as I can, if anyone can help and want some extra info just let me know and I will try to explain further.

       

      Thanks very much

        • 1. Re: Filter calculation by its measures
          John Hodgskin

          Hello Ignacio,

          I read your post a couple of times and I'm wondering if building a parameter would help you?

          Perhaps building a parameter where you can view different scenarios of your costs?

          It's difficult to understand completely without an example, but I think this may help.

          Hope I'm understanding your question correctly.

          Thanks,

          John

          1 of 1 people found this helpful
          • 2. Re: Filter calculation by its measures
            Jim Dehner

            Hi

            A little difficult without seeing you twbx workbook - it raises a question of how to connect the data

            I think I would create a data scaffold - just a consecutive list of dates that spans the date range of the data -

            so all the data could be in a common date dimension I would join each data set to the scaffold (I am assuming that the dates in the 3 data sets do not align with each other)

             

            the daa scaffold would be used as the data filter and for date calculations and the formula you use above SUM(X)+SUM(Y)+SUM(Z)+SUM(A)

             

            could be used in the viz

             

            a lot would depend on the structure of the data and the data sources

             

            JIm

            If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

             

            • 3. Re: Filter calculation by its measures
              Ignacio Laiseca

              Hey Jim,

               

              Thank you very much for your help. I cannot share my workbook because it contains company information and I cannot post online but don't worry John's answer was exactly what I needed.

              • 4. Re: Filter calculation by its measures
                Ignacio Laiseca

                Hey John,

                 

                Thank you very much! This is exactly what I needed!! You have made my life a lot easier