Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 a
This 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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
105 | |
88 | |
74 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |