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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi everyone, i looked arround and since i'm no math guru i really need help coming up with a solution for this problem, i need to replicate this logic:
| January | February | March | April | |
| Sell Out | 17 014 679,20 | 16 188 004,97 | 22 978 536,89 | 20 032 740,21 |
| Sell In | 19 980 043,44 | 20 248 217,04 | 24 824 416,44 | 21 868 254,12 |
| Estimation Stock | 2 965 364,24 | 7 025 576,31 | 8 871 455,86 | 10 706 969,77 |
So Estimation Stock for January is just Sell In - Sell Out but for Feburay it's (Sell In - Sell Out) + Estimation Stock of January
I tried to come up with 3 measures to do that but no luck so far, kinda stuck actually, i dunno if the problem is algorithmic as it seems that it needs Recursion or there's a simple workarround that i'm not able to see, here's the 2 Dax Measures that i wrote for it:
This measure calculates the differance
Estimation Stock =
VAR CurrentMois= SELECTEDVALUE('Période'[TheDate].[NoMois])
VAR PreviousMonthEstimationStock= CALCULATE([Estimation Stock],PREVIOUSMONTH('Période'[TheDate]))
RETURN
IF( CurrentMois = 1, [A], PreviousMonthEstimationStock + [A]
)
Obviously this will not run as it is self referencing itself,it's just to help you understand the logic.
Can anyone help me about it ?
Solved! Go to Solution.
Hi @ChouaibBenali ,
We can calculate the cumulative Sell-In minus the cumulative Sell-Out, and hopefully the following expression will inspire you.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hi @ChouaibBenali ,
We can calculate the cumulative Sell-In minus the cumulative Sell-Out, and hopefully the following expression will inspire you.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
@ChouaibBenali Generally recursion is not possible. However, in your case you may be able to get around that limitation by creating a measure for Previous Month Estimation Stock, Current Month Estimation Stock and your A measure.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 18 | |
| 12 | |
| 11 | |
| 6 | |
| 6 |