Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

View all the Fabric Data Days sessions on demand. View schedule

Reply
jgiles
Frequent Visitor

Need Help - Measure

Hi,

Quick question.  I'm trying to create a measure that provides the starting number based off the ending number of the prior month.  I can get it to work for the grand total but not at the row level.


Any help would be appreciated.

This is what I'm hoping to acheive:

 January  February  
NameStartAdjEndingStartAdjEnding
A19 1919-316
B11 1111 11
C23 2323124
D9129393 93
E12 1212 12
F3 33 3
G87 8787 87
H24 2424 24
I103-257878 78
J12 1212 12
Total385-23362362-2360

 

This is what I'm getting:

 January  February  
NameStartAdjEndingStartAdjEnding
A19 190-316
B11 110 11
C23 230124
D9129393 93
E12 120 12
F3 30 3
G87 870 87
H24 240 24
I103-257878 78
J12 120 12
Total385-23362362-2360
1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @jgiles ,

 

Please try:

Add a new column MonthNumber:

vjianbolimsft_0-1677119924233.png

Then apply the measure to a matrix visual:

Start' = 
var _a = CALCULATE(SUM('Table'[Adj]),FILTER(ALLEXCEPT('Table','Table'[Name]),[MonthNumber]=MAX('Table'[MonthNumber])-1))
return IF(ISBLANK(_a)&&MAX('Table'[MonthNumber])<>1,0,SUM('Table'[Start]))

vjianbolimsft_1-1677119993264.png

Final output:

vjianbolimsft_2-1677120007903.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @jgiles ,

 

Please try:

Add a new column MonthNumber:

vjianbolimsft_0-1677119924233.png

Then apply the measure to a matrix visual:

Start' = 
var _a = CALCULATE(SUM('Table'[Adj]),FILTER(ALLEXCEPT('Table','Table'[Name]),[MonthNumber]=MAX('Table'[MonthNumber])-1))
return IF(ISBLANK(_a)&&MAX('Table'[MonthNumber])<>1,0,SUM('Table'[Start]))

vjianbolimsft_1-1677119993264.png

Final output:

vjianbolimsft_2-1677120007903.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors