Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
singleton2787
Helper III
Helper III

what am I doing wrong? Calculate(sum) DAX

I want to calculate the sum of two columns were the state of 'inprogess' is subtracted from 'done'

singleton2787_0-1666119185148.png

 

1 ACCEPTED SOLUTION
PabloDeheza
Solution Sage
Solution Sage

Hi @singleton2787 !
Your calculation should be like this:

Story Points Start =
CALCULATE(
    SUM( Burndown[StoryPoint] ),
    Burndown[State] = "InProgress"
)
    - CALCULATE(
        SUM( Burndown[StoryPoint] ),
        Burndown[State] = "Done"
    )

Let me know if that helps!

View solution in original post

3 REPLIES 3
deevaker
Resolver I
Resolver I

Hi @singleton2787,

in the filter context, you can't get "In Progress" and "Done" status at the same time. You should calculate both separately and then subtract 

Story Points Start =
Var a = CALCULATE(SUM( Burndown[StoryPoint] ),Burndown[State] = "InProgress")
Var b = CALCULATE(SUM( Burndown[StoryPoint] ),Burndown[State] = "Done")

return
a-b

Thanks,

Deevaker Goel

+91-9711975011
deevaker@hotmail.com
https://www.linkedin.com/in/deevakerg/






PabloDeheza
Solution Sage
Solution Sage

Hi @singleton2787 !
Your calculation should be like this:

Story Points Start =
CALCULATE(
    SUM( Burndown[StoryPoint] ),
    Burndown[State] = "InProgress"
)
    - CALCULATE(
        SUM( Burndown[StoryPoint] ),
        Burndown[State] = "Done"
    )

Let me know if that helps!

Done shows as a negative value.. but I think we are on the right track! Maybe I'll separate the math

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.