3 Replies Latest reply on Aug 12, 2016 9:02 AM by Joe Oppelt Branched from an earlier discussion.

    Need help to write a calculated field

    youthesh sagar

      Can you please help me write a calculated field?

       

      I want divide running total of M1/ running total of M0 and then multiply by value of  M0.

       

      Example from the screenshot : (17385/23806)*1618

       

      Calculated filed should apply for whole sheet.

       

        • 1. Re: Need help to write a calculated field
          Joe Oppelt

          Post a workbook that demonstrates your sheet as shown in the screen shot.


          You can get the value of the previous month using LOOKUP(), but depending on the way your indexing is set up, you may have to edit the table calc to look in a certain direction other than the default.  (I'm guessing the default will be TABLE(across), and you'll probably want to tell it to do TABLE(down).  But it's far easier for me to try it one way or another than to describe what you should do.)

           

          If you are concerned about proprietary data, check out this video to help you make your data into something you can post here:

           

           

          Anonymize your Tableau Package Data for Sharing

          • 2. Re: Need help to write a calculated field
            youthesh sagar

            Hi Opplet,

             

            Thank you responding to my question. 

             

            My objective is to achieve result as per the below screenshot.

             

            I need to calculate the foretasted result using the formula mentioned in the screenshot.

             

            Can you please let me know how this can be achieved in tableau

             

            I have attached an excel file which will explain my objective .

             

             

             

            • 3. Re: Need help to write a calculated field
              Joe Oppelt

              OK, that's the same question as the one in the thread where I branched off your question.


              When you added your question to that previous thread it was a different question, and therefore I figured it deserved its own thread.  But you're back to the same question as the previous thread.


              And that will be even more complicated than your question here.  It will take some investment of time that I don't have.  (My own job comes first.)  That's why I recommended in the previous thread that you get consulting help.