Forum Discussion
Splitting Column containing Debits and Credits
Hi all, I'm new to PowerBi and am currently working through the tutorials.
I have a Table that has a Debit/Credit Column with a Text value of C or D and another column which contains the related amount.
I would like to split these into two Columns, with Headers of "Debit" and "Credit" with the content of the Columns being the amount.
Currently
Date: Description: Debit/Credit: Amount:
01/18 Invoice 001 Debit 100
I want to change it to
Date: Description: Debit: Credit:
01/18 Invoice 100
Any help would be greatly appreciated.
Hi UB400
In your query designer, (see image below) do the following:
1. Highlight your Credit/Debit column
2. Click on 'Pivot' in the ribbon above
3. Select 'Amount' in the values options
4. Click OK.
You should have the data in your required format. (See image 2)
Let me know how you get on.
Thanks
shebr
3 Replies
- shebrResolver III
Hi UB400
In your query designer, (see image below) do the following:
1. Highlight your Credit/Debit column
2. Click on 'Pivot' in the ribbon above
3. Select 'Amount' in the values options
4. Click OK.
You should have the data in your required format. (See image 2)
Let me know how you get on.
Thanks
shebr
- UB400Regular Visitor
shebr and Greg_Deckler thank you both for responding, greatly appreciated. I'm just gobsmacked at how things are done in PowerBI. shebr I would never have figured that one out, that is amazing, thank you. I have a lot of learning to do, and with the support that I'm receiving here, I'm looking forward to the journey
- Greg_DecklerCommunity Champion
I would do this in the Query Editor and add two Conditional Columns. Basically for Debit column, if the Debit/Credit column is "Debit", then Amount, otherwise null.