Forum Discussion

harshagraj's avatar
harshagraj
Post Partisan
5 years ago
Solved

Row total

Hello all, I have two columns No of Rev & Part No. The requirement is to get the Product of Revisions and Count of Part numbers.

I tried creating a measure like this Maxx(No of Rev)*CountA(Part No). This works in a table. But the Total is not displaying as required. Attaching the screenshot. I need sum of total as 28+6+8+36 = 78. Kindly guide me what is the modification I have to do in the measure.

 

  • Hi harshagraj ,

    You can create a measure like this:

    Total = 
    VAR tab =
        SUMMARIZE ( 'Table', 'Table'[No of Rev], "Count", COUNT ( 'Table'[Part No.] ) )
    RETURN
        SUMX ( ADDCOLUMNS ( tab, "New", [No of Rev] * [Count] ), [New] )

    Attached a sample file in the below, hopes to help you.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • Hi harshagraj
    What result do you expect to get when multiplying BLANK value (line #6) from No of Rev by a number from Count of Part No? 

      • inna_sysco's avatar
        inna_sysco
        Helper II

        harshagraj , please, correct me if I'm wrong, but as I understand, those 2 columns in the same table...
        so I assume that you can create a calculated column in this table and then just add it to the visual..


        Does it work for you?

  • v-yingjl's avatar
    v-yingjl
    Community Support

    Hi harshagraj ,

    You can create a measure like this:

    Total = 
    VAR tab =
        SUMMARIZE ( 'Table', 'Table'[No of Rev], "Count", COUNT ( 'Table'[Part No.] ) )
    RETURN
        SUMX ( ADDCOLUMNS ( tab, "New", [No of Rev] * [Count] ), [New] )

    Attached a sample file in the below, hopes to help you.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.