Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Calculate Story Point Value between two tables

I have a two tables in Power BI - One shows a "tag" type with various inputs within it and another table that expresses the value I want to associate with the "tag" I want to get a value where the count of the "tag" is multiplied by the "point" value. 

From Data below I would expect the Tag "Duplicate = 4*1", "Bulk Upload = 6*5", "New User = 8*3"

 

 

Data Table 1

Work Item IDTag
123Duplicate
124New User
125Bulk Upload
126New User
127New User
128New User
129Duplicate
130Bulk Upload
131Duplicate
132Bulk Upload
133Bulk Upload
134Duplicate
135Bulk Upload
136New User
137New User
138Bulk Upload
139New User
140New User

 

Points Table 2

Tags1Points
Duplicate1
New User3
Bulk Upload5

 

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  Anonymous ,

     

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    var _count=
    CALCULATE(
        COUNT('Data Table1'[Work Item ID]),
        FILTER(ALL('Point Table2'),'Point Table2'[Tags1]=MAX('Data Table1'[Tag])))
    return
    _count * MAX('Point Table2'[Points])
    Measure 2 =
    SUMX(
        VALUES('Data Table1'[Tag]),[Measure])

    2. Result:

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    var _count=
    CALCULATE(
        COUNT('Data Table1'[Work Item ID]),
        FILTER(ALL('Point Table2'),'Point Table2'[Tags1]=MAX('Data Table1'[Tag])))
    return
    _count * MAX('Point Table2'[Points])
    Measure 2 =
    SUMX(
        VALUES('Data Table1'[Tag]),[Measure])

    2. Result:

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

     

    Not very clear about the structure and relationship between your other two tables, if [Value] and [ID] are in the same table, you can directly MAX('True1'[ID]) * MAX('True1'[Value])

    If in different tables, you can consider to use the connection field between two tables, use measure to get [Tags.1] in table A to group to get the corresponding connection field, and then get the [ID] grouped in table B through the corresponding connection field.

    If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Updated main post with some dummy data - I couldn't load it as a PBIX file but hopefully this works