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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Alicia_Anderson
Resolver I
Resolver I

How to limit running total to a max value

I want to limit my Projected (green dotted) line to the Current Plan amount.   Right now it is extending beyond it.   

 

Effort-ProjRT = //This is the green dotted line
CALCULATE(
    [Effort-Proj],
    FILTER(
        ALLSELECTED('PI_Ref'[Sprint]),
        ISONORAFTER('PI_Ref'[Sprint], min('PI_Ref'[Sprint]), DESC)))
 
Curr Plan = CALCULATE(SUM('PI_Work'[Effort]))  //This is solid blue line
 

Alicia_Anderson_0-1658426837701.png

Suggestions?   It should look like this. (I can do it in Excel.)

Alicia_Anderson_1-1658427272857.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Alicia_Anderson ,

 

I think you can try IF() function in [Effort-ProjRT] measure.

Effort-ProjRT =
VAR _BASIC =
    CALCULATE (
        [Effort-Proj],
        FILTER (
            ALLSELECTED ( 'PI_Ref'[Sprint] ),
            ISONORAFTER ( 'PI_Ref'[Sprint], MIN ( 'PI_Ref'[Sprint] ), DESC )
        )
    )
RETURN
    IF ( _BASIC > [Curr Plan], [Curr Plan], _BASIC )

 

Best Regards,
Rico Zhou

 

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

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @Alicia_Anderson ,

 

I think you can try IF() function in [Effort-ProjRT] measure.

Effort-ProjRT =
VAR _BASIC =
    CALCULATE (
        [Effort-Proj],
        FILTER (
            ALLSELECTED ( 'PI_Ref'[Sprint] ),
            ISONORAFTER ( 'PI_Ref'[Sprint], MIN ( 'PI_Ref'[Sprint] ), DESC )
        )
    )
RETURN
    IF ( _BASIC > [Curr Plan], [Curr Plan], _BASIC )

 

Best Regards,
Rico Zhou

 

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

I had tried something like that.   That limits the projected every Sprint not just for the total.    

Anonymous
Not applicable

Hi @Alicia_Anderson ,

 

I think your calculation is based on your data model. Please share a sample file with me. This will make me easier to find the solution.

 

Best Regards,
Rico Zhou

 

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

parry2k
Super User
Super User

@Alicia_Anderson what is [Effort-Proj] measure?

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

[Effort-Proj] measure is a problem.   I have made changes to it and now I have another issue.   I am going to drop this issue and log a separate one. Thanks.

parry2k
Super User
Super User

@Alicia_Anderson Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks.  I do review previous posts before I log a new item.  I tried to add a MIN statement to use the lesser of Projected vs Plan but it applies it to every Sprint and I only want it to apply to the total. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors