Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

DAX SUM HELP

 

Ho can I calculate the sum of Qty in GRN. QTy in GRN is repeating for each line item, but i need to take the value once per each document no.

Please help on this?

 

  • Hi Anonymous ,

     

    You can use the measure below:

     

    Measure 2 =
    CALCULATE (
        SUMX (
            SUMMARIZE (
                'Table (2)',
                'Table (2)'[No_],
                "total", SUMX ( DISTINCT ( 'Table (2)'[Qty_ in Gen] ), 'Table (2)'[Qty_ in Gen] )
            ),
            [total]
        ),
        FILTER ( 'Table (2)', 'Table (2)'[QC Result] = "Accepted without Deviation" )
    )

    Best Regards,

    Kelly

14 Replies