Forum Discussion
RafaelAri
Helper III
3 years agoGet the most recent transaction date
Hello to all the experts, I have a database, that contains Warehouses inventory. The columns are: Item ID / Warehouse name / qty. in WH / Last transaction date. My goal is: Get the most recent tr...
- 3 years ago
Hi, Please check the below picture and the attached pbix file.
It is for creating a new table.
Expected table = VAR _expectedresulttable = CALCULATETABLE ( Data, FILTER ( VALUES ( Data[Item ID] ), CALCULATE ( ABS ( SUM ( Data[Qty. in WH] ) ) ) = 0 ) ) VAR _groupbylatestdate = GROUPBY ( _expectedresulttable, Data[Item ID], "@latestdate", MAXX ( CURRENTGROUP (), Data[Date Last Trans.] ) ) RETURN CALCULATETABLE ( Data, TREATAS ( _groupbylatestdate, Data[Item ID], Data[Date Last Trans.] ) ) - 3 years ago
- 3 years ago
Thanks a lot, it did the work!
RafaelAri
Helper III
3 years agoI found some mistakes in this solution, but thanks anyway for your replay 👍