Forum Discussion

slhyrkl's avatar
slhyrkl
Frequent Visitor
2 years ago
Solved

Need help to split multiple values in one column for the duplicated rows.

As shown in the picture I attached, T here is one part (part no 127316) has multiple values in the next column. I want to split those values into different columns based on the same part no. 78.96...
  • ryan_mayu's avatar
    2 years ago

    slhyrkl 

    actually i don't suggest you to pivot table. 

     

    you can create a column

    Column =
    VAR a=minx(FILTER('Table','Table'[c]=EARLIER('Table'[c])&&'Table'[d]<EARLIER('Table'[d])),'Table'[d])
    return if(CALCULATE(count('Table'[d]),ALLEXCEPT('Table','Table'[c]))=1,"Current",if(ISBLANK(a),"last","Current"))
     
     
    then you can create a measure to calcualte difference
    Measure = CALCULATE(sum('Table'[d]),'Table'[Column]="Current") - CALCULATE(sum('Table'[d]),'Table'[Column]="last")
     
     
    pls see the attachment below