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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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