Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I need a measure that prints out 1 and increments +1 each time the team# summed hits the max. The measure i have below is giving me a strange result. see pic below.
Period =
VAR Priority = SELECTEDVALUE('Epic'[Priority])
RETURN
IF (
ISBLANK(Priority),
BLANK(),
VAR CumulativeTotal =
CALCULATE (
SUM ( 'Epic'[Teams/PI Avg] ),
REMOVEFILTERS ( 'Epic' ),
'Epic'[Priority] <= SELECTEDVALUE ( 'Epic'[Priority] )
)
VAR Divisor = SELECTEDVALUE ( 'Epic'[Portfolio Supply] )
VAR Suffix = IF ( Divisor <> 0, QUOTIENT ( CumulativeTotal - 1, Divisor ) )
VAR Result = VALUE ( Suffix + 1)
RETURN IF ( ISINSCOPE ( 'Epic'[Priority] ), Result ) -- gets rid of the nonsensical Total value
)
here is the PBIX: Test Max PBIX
Please clarify what you mean by "hits the max". Is it when the next number is lower? If so, why doesn't your final value of 0 get a result of PI 4?
Pat
Thank you for responding. The portfolio supply column is the max value.
The Teams/PI Avg is summed till it hits the portfolio supply, and then resets the running total again. I need the Period to return the text "PI 1". Once the running total, resets it should return "PI 2" and so on.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 5 | |
| 5 | |
| 3 |