2 Replies Latest reply on Jul 6, 2018 4:20 AM by Jim Dehner

    Can I use values in fixed statement?

    Mayur Runwal

      Can I use values in fixed statement? for example:

       

      { FIXED [Current Fiscal Quarter Flag],[Region]='AMS',[Deployment]='Production',[Users] = 'CAD + CAE'':SUM({ FIXED [Delivery Group]:MAX([DG Count])})}

       

      I am new to Tableau. Is this right way to do it? Or can we do it in alternate / easy way?

        • 1. Re: Can I use values in fixed statement?
          Jeevan Krishna

          Hi Mayur,

           

          Create a calculated field with all the conditions you have using and clause like this.

           

          [Region]='AMS'

          and

          [Deployment]='Production'

          and

          [Users] = 'CAD + CAE'

           

          This will result in a Boolean field. Use this filed instead of all the conditions you have included in the above question.

           

          Apply this boolean field as a filter and select TRUE.

           

          Hope this helps

          • 2. Re: Can I use values in fixed statement?
            Jim Dehner

            Good morning

            The question - can you use values in an LOD - yes you can -

            the calculation you created is a little complex but you could od it that way or your could put your conditional clauses after the colon:

             

            But here is what is going on with the fixed LOD - Fixed creates combinations of all the dimensions that precede the colon and then aggregates them by what follows the colon - so if your statement was just 

             

                 [Fiscal Quarter],[Region]',[Deployment],[Users]: ...

            the statement would make all the combinations of quarter, region, deployment, and users to create a higher level of data for your data - that level is not an aggregate in itself and can be used in all other types of calculation including other LODs or table - by specifying values for the dimensions tableau will calculate a single value - that's OK but not that useful for use in other calculations

            A better approach is use the conditions as qualifiers in the next level of the calculation - it is also more efficient

             

            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.