Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Carter_364
New Member

How to get a total sum of information from multiple columns

Hi there,

 

I am working with a similar data set to the image below, however on a much bigger scale (13,000+ rows).

 

Screen Shot 2024-04-30 at 3.47.04 PM.png

 

I am trying to get a count for the following headings:

Total number of people who have lived in Wellington

Total number of people who have lived in Auckland

Total number of people who have lived in Christchurch

Total number of people who have lived in Dunedin

Total number of people who have lived in Rotorua

As well as slicing by year of birth (how many people born in 1992 have lived in each location, how many people born in 1993 have lived in each location etc.) if possible?

 

E.g. 'X' number of people have lived in Wellington, 'X' of which were born in 1992, 'X' of which were born in 1993 etc.

 

Is there a way to read all 4 location columns to find this information? A measure? Pivoting table?

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

you can try to unpiovt the table in the PQ. select the location columns and unpivot columns. 

 

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 

then all the location data will be in the one column, that will be easier to calculate

 

if this does not solve the your problem, pls provide the sample data (not the screenshot) and the expected output based on the sample data you provided.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

you can try to unpiovt the table in the PQ. select the location columns and unpivot columns. 

 

https://support.microsoft.com/en-us/office/unpivot-columns-power-query-0f7bad4b-9ea1-49c1-9d95-f5882...

 

then all the location data will be in the one column, that will be easier to calculate

 

if this does not solve the your problem, pls provide the sample data (not the screenshot) and the expected output based on the sample data you provided.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Perfect! Thank you very much!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.