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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have single integer column , trying to calculate difference without any date or year or month column
E.g
Column X Expected Diff
14 0
9 14-9= 6
3 9-3=6
Thank you
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Solved! Go to Solution.
Hi @mh2587 ,
Create an index column and try the following formula:
Column 2 =
VAR cur_index = 'Table'[Index]
RETURN
IF (
cur_index - 1 < 0,
0,
CALCULATE (
MAX ( 'Table'[Column] ),
ALL ( 'Table' ),
'Table'[Index] = cur_index - 1
) - 'Table'[Column]
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mh2587 ,
Create an index column and try the following formula:
Column 2 =
VAR cur_index = 'Table'[Index]
RETURN
IF (
cur_index - 1 < 0,
0,
CALCULATE (
MAX ( 'Table'[Column] ),
ALL ( 'Table' ),
'Table'[Index] = cur_index - 1
) - 'Table'[Column]
)
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@mh2587 ,
You need add an index column in power query the
a new column =
[Columnx] - Maxx(filter(Table, [Index] = earlier([Index]) -1 ),[ColumnX])
I tried its not working
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Thanks for the response i will try that way
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 63 | |
| 55 | |
| 42 | |
| 41 | |
| 23 |
| User | Count |
|---|---|
| 167 | |
| 135 | |
| 120 | |
| 79 | |
| 53 |