Forum Discussion

tangutoori's avatar
tangutoori
Icon for Helper III rankHelper III
3 years ago

Show previous date data and new changes from table 2

Dear All,

 

Am facing the below scenario.

i need to show the O/P as below.

 

 

NameQtyDate Hints for solution work around
a106-Jan-23  
b206-Jan-23  
c306-Jan-23  
     
NameQtyDate  
a210-Jan-23 Qty changed from 1 to 2
e310-Jan-23 New name added
c310-Jan-23 No qty changed, remove from O/P table
     
O/P    
NameQtyDate  
a106-Jan-23  
b206-Jan-23  
c306-Jan-23  
a210-Jan-23  
e310-Jan-23  

 

2 Replies

  • tangutoori , Try a new column like

     

    New column =
    var _date = maxx(filter(Table, Table[Date] < earlier(Table[Date]) ), Table[date])
    var _qty = maxx(filter(Table, Table[Date] =_date && [Name] = Earlier([Name]) ), Table[Qty])
    return
    Switch( true() ,
    isblank( _date) , blank(),
    isblank(_qty), "New",
    [Qty] <> _qty , "Qty Changed From " & _qty & " to " & [Qty],
    "Same"
    )

  • Hi Amit,

     

    you have mistaken, i need 3rd table as O/P not a column. 

     

    NameQtyDate
    a106-Jan-23
    b206-Jan-23
    c306-Jan-23
       
    NameQtyDate
    a210-Jan-23
    e310-Jan-23
    c310-Jan-23
       
    O/P  
    NameQtyDate
    a106-Jan-23
    b206-Jan-23
    c306-Jan-23
    a210-Jan-23
    e310-Jan-23