Forum Discussion

Raavë's avatar
Raavë
New Member
2 years ago
Solved

Incorrect total

Hi, everyone. In this table, Balance is a measure of subtraction between Purchases[Total_quantity] and Received[Net_volume] tables. The issue here is the total. It's subtracting the total of Volum...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,Raavë I am glad to help you.
    Hello,LeandroDeodato ,Greg_Deckler ,thanks for your concern about this issue.

    Your answer is excellent!
    And I would like to share some additional solutions below.
    You can create a helper column or use another existing column as a filter for the ISINCPOED function.
    Sorting the results of calculations to discuss the TOTAL row and other common rows
    Here I have created a sorted row index (via power query)
    This is used as a hierarchical determinant to actively modify the results displayed by total
    Here is my test data:

    measures I created:

    Contracted quantity = 
    SUM('Table'[C_Contracted quantity])
    
    Volume  received = 
    SUM('Table'[C_Volume  received])
    
    Balance = [Contracted quantity]-[Volume  received]
    M_Blan_result = IF(ISINSCOPE('Table'[Index]),
    [Contracted quantity]-[Volume  received],
    SUMX(
        FILTER(
            'Table',
            [Balance] > 0
            ),
        [Balance]
        )
    )
    //Use HASONEVALUE()or ISINSCOPE() determine the hierarchy of the current MEASURE calculation

     

    Could you share model data or examples of your PBIX files (without sensitive data). You can upload your files using onedrive, google drive, we transfer or similar links.
    This will help to solve your problem.

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
    Best Regards,
    Carson Jian,
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.