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.
Hello Everyone,
I would like to be able to help me with this problem that I currently have.
I have a table with 3 fields (Source, WeekOffset, Amount), in the first table of the image you can simply see the organization of the matrix:
The problem is that I need the total each week offset to be the start of the following week. Just like an opening balance.
Does anyone know how this can be done?
I thank you in advance for your cooperation.
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Value total measure: =
SUM( Data[Value] )
Value all source: =
CALCULATE ( [Value total measure:], ALL ( Source[Source], Source[Index] ) )
Expected result measure: =
VAR _prevwk =
CALCULATE ( [Value all source:], WINDOW ( 1, ABS, -1, REL, ALL ( Week[Wk] ) ) )
RETURN
IF (
SELECTEDVALUE ( Source[Source] ) = "Prev Wk",
_prevwk,
_prevwk + [Value total measure:]
)
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
Value total measure: =
SUM( Data[Value] )
Value all source: =
CALCULATE ( [Value total measure:], ALL ( Source[Source], Source[Index] ) )
Expected result measure: =
VAR _prevwk =
CALCULATE ( [Value all source:], WINDOW ( 1, ABS, -1, REL, ALL ( Week[Wk] ) ) )
RETURN
IF (
SELECTEDVALUE ( Source[Source] ) = "Prev Wk",
_prevwk,
_prevwk + [Value total measure:]
)
Yes this is pefect!.
I didn't have a Source table, only a Calendard an Detail table, but I will create the Source table from values and add the Previous Week.
Thanks a lot
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 |
---|---|
9 | |
8 | |
8 | |
4 | |
3 |
User | Count |
---|---|
14 | |
13 | |
11 | |
10 | |
10 |