Forum Discussion
Convert every 6 rows into columns
- 5 years ago
Brazil is great, I'm helping you from Portugal! ๐
Sorry if I skipped some detailed steps...
You need to go here:
After that, write the following code (for each column you gonna need), adapting your if-statement to each column.
E.g.:
Column Name = if [Column 2] = "Name" then [Column 1] else null Column Id = if [Column 2] = "Id" then [Column 1] else null ...Um abraรงo! ๐
Hi Anonymous ,
I think I've found a receipt for this!
Used the following sample data:
Then created 4 custom columns with the following code:
if [Column 2] = ##Column_to_be_created then [Column 1] else null
After that, you need to fill-down the first custom column created and fill-up the last one and the penultimate
To finish, filter the third column to eliminate null values
Note: This solution may not be feasible for other scenarios, and it is better to confirm that you do not "lose" data through the process...
Any questions, don't hesitate!
Best Regards,
Eduardo
[Edited because sample data was wrong.]
- Anonymous5 years agoNot applicable
Hi Edu!
Greetings from Brazil ๐
I couldn't add the first line (if [Column 2] = ##Column_to_be_created then [Column 1] else null)
..I'm kind of newbie at PBI.
I've tried to insert your string at custom column but showed me "expected literal token" ๐- edugoncalves5 years agoResolver I
Brazil is great, I'm helping you from Portugal! ๐
Sorry if I skipped some detailed steps...
You need to go here:
After that, write the following code (for each column you gonna need), adapting your if-statement to each column.
E.g.:
Column Name = if [Column 2] = "Name" then [Column 1] else null Column Id = if [Column 2] = "Id" then [Column 1] else null ...Um abraรงo! ๐
- Anonymous5 years agoNot applicable
One more thing, edugoncalves ...
I'm trying to remove the null's with your tip but I couldn't...lol
I have to put the Fill up and down after the code to add custom? I've tried shift + enter but returns me an error ....I could only fill down the first collumn but not the others ๐- Anonymous5 years agoNot applicable
BTW, edugoncalves in my original file I have 7 columns