Forum Discussion
Adding Decimals based on Row Values
- 8 years ago
Hi jambarama,
Since the number of columns is big and the size of the dataset is large, I would use R to do this job. Please refer to the attachment.
1. Import the data source;
2. Remove the third row. (Item_Description);
3. Change the data type of some columns to the proper type;
4. Run a piece of R script.
columns <- length(dataset) denominator <- 10 ^ dataset[1, 3:columns] dataset[3: columns] <- mapply("/", dataset[3: columns], denominator) result <- dataset5. Remove the first row.
Best Regards,
Dale
Hi jambarama,
Since the number of columns is big and the size of the dataset is large, I would use R to do this job. Please refer to the attachment.
1. Import the data source;
2. Remove the third row. (Item_Description);
3. Change the data type of some columns to the proper type;
4. Run a piece of R script.
columns <- length(dataset)
denominator <- 10 ^ dataset[1, 3:columns]
dataset[3: columns] <- mapply("/", dataset[3: columns], denominator)
result <- dataset
5. Remove the first row.
Best Regards,
Dale
Thanks Dale, I figured it was probably too much to expect from power query. I'm not sure we want to introduce R into our workflow, but I have some other options to explore.
Thank you for the response.