Hello @Hrvoje Somun? , thank you for your question.
Regarding the first step - you'll need to use the fill() function while sorting the columns via the metadata parameter $sourcerownumber. This way, you'll be able to use the original value sorting, while all the empty cells will "look up" to find the first non-empty value.
- I've used "edit with formula" to edit the existing columns
- I've used $col to refer to the original column values
- I've used -1 in the second parameter to look up "without limitations"
- I've used 0 in the third parameter so to never "look down"
Regarding the second step to reach the pivot table - this isn't a tabular presentation of the values, and isn't something we do in Trifacta. At least, not without a lot of tinkering, which I do not recommend.
I'd advise creating this pivotal presentation through any BI tool of your choice.
I hope this helps,
Please feel free to ask any additional questions.
Thanks,
Amit.