Forum Discussion

francsaaa's avatar
francsaaa
Regular Visitor
2 years ago
Solved

Incorrect value on the total sum

I have a calculations that shows the total residual value of -316 on the home move category on Excel but on powerbi, it is showing -1 on other (includ. impact upgrades). I want it to show -316 on Home move just as in Excel.

 

How can i solve the challenge to reflect in PowerBI

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi francsaaa ,

     

    A similar display effect can be achieved by the following formula.

    result_ =
    VAR sum_ =
        CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) )
    RETURN
        IF (
            MAX ( 'Table'[Cate] ) = "Home move",
            sum_,
            IF ( HASONEVALUE ( 'Table'[Cate] ), BLANK (), BLANK () )
        )
    

     

    Best Regards,
    Adamk Kong

     

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

5 Replies