Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |