Forum Discussion
Count from multiple columns.
- 3 years ago
Hi , AnkurSharma
Accoridng to your description, you want to "Count from multiple columns".
Here are the steps you can refer to :
(1)My test data is the same as yours.
(2)You can add a step after the previous steps in Power Query Editor (Insert Step After)
And then you can put this code in it:
= Table.SelectColumns(#"Changed Type",{"Name 1","Count Name 1"}) & Table.RenameColumns(Table.SelectColumns(#"Changed Type",{"Name 2","Count Name 2"}),{{"Name 2", "Name 1"},{"Count Name 2", "Count Name 1"}}) & Table.RenameColumns(Table.SelectColumns(#"Changed Type",{"Name 3","Count Name 3"}),{{"Name 3", "Name 1"},{"Count Name 3", "Count Name 1"}})Then we can get the table like this:
Then we just need to put the fields on the visual and we can meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , AnkurSharma
Accoridng to your description, you want to "Count from multiple columns".
Here are the steps you can refer to :
(1)My test data is the same as yours.
(2)You can add a step after the previous steps in Power Query Editor (Insert Step After)
And then you can put this code in it:
= Table.SelectColumns(#"Changed Type",{"Name 1","Count Name 1"}) &
Table.RenameColumns(Table.SelectColumns(#"Changed Type",{"Name 2","Count Name 2"}),{{"Name 2", "Name 1"},{"Count Name 2", "Count Name 1"}}) &
Table.RenameColumns(Table.SelectColumns(#"Changed Type",{"Name 3","Count Name 3"}),{{"Name 3", "Name 1"},{"Count Name 3", "Count Name 1"}})
Then we can get the table like this:
Then we just need to put the fields on the visual and we can meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- AnkurSharma3 years agoHelper I
Thanks Aniya Zhang