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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
AjithPrasath
Resolver II
Resolver II

Help with the dax query

Hi Everyone,

   I have Sprint number column, offshore billable hours(measure) column . I also have constant offshore approved sow(lets say for ex: 11516). I have to create the new measure Remaining hours for calculating as per the below logic:

 

1. For first sprint alone(Ex: sprint0) I have to subtract offshore approved sow- offshore billable hours for Remaining hours.

2. From next sprint I have to subtract the previous value of the remaining hours  and offshore billable hours of the current row

 

lets say  offshore approved sow=100. The logic will be like below:

Sprint NumberOffshore Billable hoursRemaining hours
01090(100-10)
12070(90-20)
23040(70-30)

 

2 REPLIES 2
AjithPrasath
Resolver II
Resolver II

Hi @FreemanZ ,

  I don't want to subtract from the 100 for every sprint. I just need to subtract from constant only in the first sprint. After that I have to subtract from the remaining hours value which I got in the previous sprint.

For ex: sprint 0==> 100-20=80.

           sprint 1==>80-10=70

here 20 and 10 are offshore billable hours for the respective sprints. Please find the SS below of my data:

AjithPrasath_0-1682491649969.png

I have to calculate the remaining hours from the above data as per the mentioned logic. Thanks in advance.

FreemanZ
Super User
Super User

hi @AjithPrasath 

try like:

Remaining hours =
100 - 
SUMX(
    FILTER(
        Data,
        Data[Sprint Number]<=MAX(data[Sprint Number])
    ),
    [offshore billable hours]
)

 

in case of issue, please consider post some sample data. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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