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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AdityaG
Helper I
Helper I

DAX for starting number as 0 and subsequent difference in each subgroup

Hi all

 

I would like to convert the following values in the result given below:

 

GroupValuesResult
A00
A2020
A3030
B150
B205
B4025
C00
C1010
C2525

 

Basically, the first value should start from 0, and subsequently, the numbers should be the difference from the value in the first value of the subgroup in the original column.

 

For instance, for subgroup B, the starting value = 15. Hence the new starting value is 0, 20 is converted to 20-15=5 and 40 to 40-15=25.

 

Please help me on this. Thanks!

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @AdityaG 

Assuming a calculated column please try

Result =
VAR FirstValue =
CALCULATE ( MIN ( 'Table'[Values] ), ALLEXCEPT ( 'Table', 'Table'[Group] ) )
RETURN
'Table'[Values] - FirstValue

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @AdityaG 

Assuming a calculated column please try

Result =
VAR FirstValue =
CALCULATE ( MIN ( 'Table'[Values] ), ALLEXCEPT ( 'Table', 'Table'[Group] ) )
RETURN
'Table'[Values] - FirstValue

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.