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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I calculate the Remainder:
Solved! Go to Solution.
Hm, I'm unfortunately stumped at the moment after looking at it for a while. The closest I got was using a cumulative total and the quotient in the PI measure, which at least solves your issue running total not resetting if the remainder was non-zero. However, that doesn't quite work with your requirement that the running total resets.
PI =
VAR CumulativeTotal =
CALCULATE (
SUM ( Epic[TeamsPi Avg] ),
REMOVEFILTERS ( Epic ),
Epic[Epic ID] <= SELECTEDVALUE ( Epic[Epic ID] )
)
VAR Divisor = SELECTEDVALUE ( Epic[Portfolio Supply] )
VAR Suffix = IF ( Divisor <> 0, QUOTIENT ( CumulativeTotal - 1, Divisor ) )
VAR Result = "PI " & FORMAT ( Suffix + 1, "0" )
RETURN IF ( ISINSCOPE ( Epic[Epic ID] ), Result ) -- gets rid of the nonsensical Total value
Accounting for the reset the first time it's with a non-zero remainder is easy; keeping that "memory" has proved more difficult for me, since you can only use one "formula" for the entire "column".
I wish I could be of more help at the moment but the above is the best I have for now. If I figure something else out, I'll let you know. 😄
Proud to be a Super User! | |
Hello,
Can you please share your pbix file?
Proud to be a Super User! | |
How do i attach my PBIX to this post? I looked at all the buttons and don't see an attach file or pbix. I see attach media, link pic, etc., but none to upload the PBIX.
You can upload it somewhere (ex: Google drive or Dropbox) and share the link to the file.
Proud to be a Super User! | |
Hm, I'm unfortunately stumped at the moment after looking at it for a while. The closest I got was using a cumulative total and the quotient in the PI measure, which at least solves your issue running total not resetting if the remainder was non-zero. However, that doesn't quite work with your requirement that the running total resets.
PI =
VAR CumulativeTotal =
CALCULATE (
SUM ( Epic[TeamsPi Avg] ),
REMOVEFILTERS ( Epic ),
Epic[Epic ID] <= SELECTEDVALUE ( Epic[Epic ID] )
)
VAR Divisor = SELECTEDVALUE ( Epic[Portfolio Supply] )
VAR Suffix = IF ( Divisor <> 0, QUOTIENT ( CumulativeTotal - 1, Divisor ) )
VAR Result = "PI " & FORMAT ( Suffix + 1, "0" )
RETURN IF ( ISINSCOPE ( Epic[Epic ID] ), Result ) -- gets rid of the nonsensical Total value
Accounting for the reset the first time it's with a non-zero remainder is easy; keeping that "memory" has proved more difficult for me, since you can only use one "formula" for the entire "column".
I wish I could be of more help at the moment but the above is the best I have for now. If I figure something else out, I'll let you know. 😄
Proud to be a Super User! | |
I appreciate you trying! If you can think of anything let me know. I'm still thinking and maybe need to redo the logic altogether.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
11 | |
10 | |
10 |