Forum Discussion

BenCardineau's avatar
BenCardineau
Helper I
4 years ago
Solved

dynamic title using calculation group

Hi Folks.   using the awesome Tabular Editor, I created a calculation group to format values in $ or Hours depending the selectedvalue of a drop down. That works fine with my values. The problem is...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi, BenCardineau -
    Are you trying to use a Measure to define the Title Text?  If so, when you define the text string measure, you need to exclude it from your Calculation Group rules.  I think you need to add a ISSELECTEDMEASURE() condition to your calculation groups so it focus on the Metric Measures only, and ignores String Measures.

    For example:
    Metric Measure = SUM ( [Amount] )
    Text Measure = IF ( SELECTEDVALUE ( [Project Type] , "Hours" ) = "Dollar" , "Project $", "Project Hours")

    In the calculation group expression, the following is required.
    IF ( NOT( ISSELECTEDMEASURE( [Mertric Measure] ) ), SELECTEDMEASURE() , IF ( SELECTEDVALUE ( [Project Type] , "Hours" ) , Use Dollars , Use Hours ) )


    In the Expression Format, the following is added.

    IF ( NOT( ISSELECTEDMEASURE( [Mertric Measure] ) ), "" , IF ( SELECTEDVALUE ( [Project Type] , "Hours" ) , Use Dollars format , Use Hours format ) )

     

    I hope this helps you find the right solution.