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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.