Calculate Labels

Hi Team ,

I am using labels for specific numeric values. I would like to know how to sum the values from labels in my report. Currently I am exporting the report to excel for that . Could you please advise me how I can define calculated member formula for labels ?

Thank you in advance
Justyna

Hi @Justyna_Cieslak,

The label is a universal field containing different types of information, and it might be challenging to get some insight out of those data. For numeric values that are used for mathematical operations, you might consider using a separate field; that might simplify data processing in Jira and eazyBI.

However, there are options for transforming some of the labels to numbers and using them for calculations. You might want to start with calculated measures to map the string to numbers and then sum up the values.

  1. In Measures, define a new calculated measure, “Label to number,” that would map specified labels to the numeric values. For the calculation, use condition CASE WHEN a label name is “xxx” THEN use numeric value 999 END.

    CASE [Label].CurrentMember.Name
      WHEN "1000" THEN 1000
      WHEN "333" THEN 333
      WHEN "documentation" THEN 100
    END
    

    More details on calculated measures and conditions are here: Calculated measures - eazyBI for Jira.

  2. In Measures, define another calculated measure that would sum up label values for issues with specified labels.

    CASE WHEN --individula lables in the report
      [Label].CurrentHierarchyMember.Level.Name = "Label"
    THEN --multiply issue count with label value
      [Measures].[Issues created count] * [Measures].[Label to number]
    ELSE
      Sum(
        --set of lables with mapping to numeric values
        {[Label].[1000],
         [Label].[333],
         [Label].[documentation] },
        --sum up label value for issues with listed labels
        [Measures].[Issues created count] * [Measures].[Label to number]
      )
    END
    

An alternative solution is to create a JavaScript calculated custom field that would check on numeric label values and import them in eazyBI as a measure. Please see the documentation for more details:

Best,
Zane / support@eazyBI.com

1 Like

Thank you for sharing this information