Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello!
Below is my sample dataset. I would like to create the 'Calculation' column which subtracts the subsequent values for each ID.
| ID | Index | Value | Calculation |
| A | 1 | 100 | 100-0 = 100 |
| B | 1 | 250 | 250-0 = 250 |
| A | 2 | 300 | 300-100 = 200 |
| B | 2 | 600 | 600-250 = 350 |
| A | 3 | 350 | 350-300=50 |
Thanks in advance,
P.S new to DAX and Power BI
Solved! Go to Solution.
Hi @Zabeer
Try this for your calc column:
New Col =
VAR previous_ =Table6[Index]-1
RETURN
Table6[Value]- CALCULATE(DISTINCT(Table6[Value]), Table6[Index]=previous_,ALLEXCEPT(Table6, Table6[ID]))
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @Zabeer
Try this for your calc column:
New Col =
VAR previous_ =Table6[Index]-1
RETURN
Table6[Value]- CALCULATE(DISTINCT(Table6[Value]), Table6[Index]=previous_,ALLEXCEPT(Table6, Table6[ID]))
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers