|Column1|Column2|Column3|Column4|
|Revenue from operations |A|B|0|
|Other income|0|0|0|
|Cost of raw materials and packing materials consumed|0|0|0|
|Changes in inventories of finished goods and work-in-progress|0|0|0|
|Employee benefits expense|0|0|0|
|Finance costs|0|0|0|
|Depreciation|0|0|0|
|Other expenses|0|0|0|
Here I have to change the position of the rows like
if first column of the row contains “Other income” then this row will come on first like this.
Means here row 2 has “Other Income” so it becomes the first row in the output data table
@Karan28 What are the other conditions ? Is there a Specific order you have to follow throughout ? Will there be any other row with the same values present in the Column1 ?
Yes there will be specific orders and the rows will be unique.
for example
if the row(0) contains Finance costs
then that full row comes on the third position in the datatable.
if row(0) contains depreciation then that row will come on the 5th position.Basically it is the rearangement of rows on the basis of values in column A
Revenue from operations
Cost of raw materials and packing materials consumed
Employee benefit expenses
Other expenses
Changes in inventories of finished goods and work-in-progress
Depreciation
Other income
Finance cost
@Karan28 Check this Workflow :
Test it for all possible cases. But I have used an Additional Package that needs to be added.
You can download it from the Manage Packages. If you don’t want to use it. We can come up with a Different approach. But mainly check if the Output is the expected one.
Hey , I have seen your solution its kinda good but doesnt satisfy my condition , its like if some column A contains "Revenue from operation " then out that on row 1. So I cannot use equal I have to use contains only because sometimes string differ little bit like operation and operationS so I have to use contains only.
and second is if I dont find “Revenue from operations” then I should leave that condition and check for other string
@Karan28 Yes. It does have some restrictions But I’ll try to modify that, I think you can use the other method provided. So The row Order will remain the same right and if the row values are missing for a particular keyword, then just include the remaining in the same order . Is that right?
@Karan28 Check this Workflow :
A little bit of modification had to be made to choose the Columns Existing. You can try and revert back. You can provide feedback again if it doesn’t satisfy the requirement.
One row is missing in the Build Datatable TransposeRows.zip (2.7 KB)
HI , I have seen this . Its better than before.
but Can I use contains logic here
{“Col 1”,“Revenue from operations”,“Cost of raw materials and packing materials consumed”,“Employee benefits expense”,“Other expenses”,“Changes in inventories of finished goods and work-in-progress”,“Depreciation”,“Other Income”,“Finance costs”}
for example it will check like if it contains “Revenue” then that row goes on first position
@Karan28 Yes. Just replace them with your Keywords.
It can be in this way as well. But make sure it is unique.
{“Col 1”,“Revenue”,“Cost of raw materials”,“Employee benefits ”,“Other expenses”,“Changes in inventories”,“Depreciation”,“Other Income”,“Finance costs”}
This is the great solution now ,Thankyou so much.
I have one thing to add here , so I neeed to add the first 4 rows here and the sum of first 4 rows will be in the 5 row.
Suppose the final output datatable I get after you logic.In that final datatable I have to add first four rows and the sum of those rows comes in the 5th row. like {“Total”,100,200,300} where 100,200,300 is the sum of above four rows numbers .numbers will be in negative or positive in all the rows