Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have an index for each order number as there is multiple entries for each. I want to grab the previous rows WCode.
This the DAX statement that I have been trying to use.
Test = VAR a = CALCULATE ( FIRSTNONBLANK('Gip700 Summary'[WCode]) FILTER( 'Gip700 Summary', 'Gip700 Summary'[Index]= EARLIER('Gip700 Summary'[Index]) && 'Gip700 Summary'[Order Number] = EARLIER('Gip700 Summary'[Order Number])) ) RETURN a
Solved! Go to Solution.
Heres the solution to this.
Test = IF('Gip700 Summary'[Order Number]='Gip700 Summary'[Order Number],LOOKUPVALUE('Gip700 Summary'[WCode],'Gip700 Summary'[Index],'Gip700 Summary'[Index]+1))Heres the solution to this.
Test = IF('Gip700 Summary'[Order Number]='Gip700 Summary'[Order Number],LOOKUPVALUE('Gip700 Summary'[WCode],'Gip700 Summary'[Index],'Gip700 Summary'[Index]+1))Hi, you could use powerquery to replace zeroes with null and then fill down the column, would that work? You could order data in by index first
Dan
Test = VAR a = CALCULATE ( FIRSTNONBLANK('Gip700 Summary'[WCode]) FILTER( 'Gip700 Summary', 'Gip700 Summary'[Index]= EARLIER('Gip700 Summary'[Index]) && 'Gip700 Summary'[Order Number] = EARLIER('Gip700 Summary'[Order Number])) ) RETURN aThis the DAX that I have been trying to work with.
I wouldn't be able to do that as zero is a code that I would need for a seperate column after I can get the test column completed
You could duplicate the column if you need the zeroes
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.