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.
Hello everyone - i am trying to figure out how to get the last/latest product for a given transaction based on the line number as shown below. any idea how to do this?
Solved! Go to Solution.
This seems to work!
Column = CALCULATE ( FIRSTNONBLANK ( 'Table'[ProductName], 1 ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[TransactionNum] ), 'Table'[LineNum] = CALCULATE ( MAX ( 'Table'[LineNum] ), ALLEXCEPT ( 'Table', 'Table'[TransactionNum] ) ) ) )
Hi @ConstMoss,
Try this calculated column formula
=LOOKUPVALUE([ProductName],[LineNum],CALCULATE(MAX([LineNum]),FILTER(Data,[TransactionNum]=EARLIER([TransactionNum]))),[TransactionNum],[TransactionNum])
Hope this helps.
Hi @ConstMoss,
Try this calculated column formula
=LOOKUPVALUE([ProductName],[LineNum],CALCULATE(MAX([LineNum]),FILTER(Data,[TransactionNum]=EARLIER([TransactionNum]))),[TransactionNum],[TransactionNum])
Hope this helps.
This seems to work!
Column = CALCULATE ( FIRSTNONBLANK ( 'Table'[ProductName], 1 ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[TransactionNum] ), 'Table'[LineNum] = CALCULATE ( MAX ( 'Table'[LineNum] ), ALLEXCEPT ( 'Table', 'Table'[TransactionNum] ) ) ) )
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 |
---|---|
113 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |