Forum Discussion

Faber13's avatar
Faber13
Helper II
3 years ago
Solved

first code value

hello guys, I need to reproduce the result below in power bi  



codigo       valor       resultado

105050
1050 
1050 
20100100
20100 
20100 
20100 
  • Hi Faber13 ,

     

    Please try:

    First add an index coolumn:

    Then add a column:

    resultado = IF([Index]=MINX(FILTER('Table',[codigo]=EARLIER('Table'[codigo])),[Index]),[valor])

    Final output:

     

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Hi Faber13 ,

     

    Please try:

    First add an index coolumn:

    Then add a column:

    resultado = IF([Index]=MINX(FILTER('Table',[codigo]=EARLIER('Table'[codigo])),[Index]),[valor])

    Final output:

     

    Best Regards,

    Jianbo Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.