4 Replies Latest reply: Sep 10, 2014 2:51 PM by conor cliffe RSS

    Calculation Condition for a chart

      Hi,

       

      I have a bar chart with three expressions; total charges, total payments and total account balance. My dimension is country name.

       

      I would like to add a calculation condition to a chart that says only pull in charges and payments (already in chart) if the Hospital Account Status = Billed.

       

      Do I add a Calculation Condition on the general tab of the chart? If so, should it read - If(Hospital Account Status="Billed").

       

      Thanks in advance.

        • Calculation Condition for a chart
          John Duffy

          Hello.

           

          A Calculation Condition is used to determine whether or not a chart is to be displayed.

           

          If I understand your question correctly, you want to always display the chart but only total charges and payments if the Account Status = Billed.  In that case you want to add a condition to your expression something like:

          Sum(if(Acct_Status = 'Billed',Charges,null()))

           

          John.

          • Calculation Condition for a chart
            Stefan Wühl

            The calculation condition will affect the complete chart, calculate yes/no.

            If you want that,

            if([Hospital Account Status] = 'Billed',1,0)

             

            could do what you want.

             

            Do you want to limit the two expressions to a subset of the data only, depending on Hospital account status?

             

            For this, of your expression for charges is something like

            =sum(Charges)

             

            then change the expression to

            =sum({<[Hospital Account Status]= {Billed}>} Charges)

             

            and accordingly for payments.

             

            This is a set analysis expression, you could also try

            =sum(if([Hospital Account Status]= 'Billed', Charges))

             

            Hope this helps,

            Stefan