The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I need help to create DAX code to subtract previous row in SMU column. - refer table below.
For example 682-0=0, 895-682=213,910-895=15,950-910=40,1682-950=732.
Any assistance would be greatly appreciated thank you.
Solved! Go to Solution.
@Anonymous , Try a new column like
Diff =[SMU] - maxx(filter(Table, [machine_no] =earlier([Machine_no]) && [SMU] < earlier([SMU])),[SMU])
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |