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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

A newbie question about combining information from different columns

Hi! 

 

I have a data sheet that has three columns from which I want to combine data from. Here's an example. 

 

Column1        Column2       Column3

Topic 1           Topic 2          Topic 3

Loneliness      Depression   

Friendship      Abuse            Loneliness

Depression     Friendship

 

I would like to make a chart that shows in visual form how many times different answers appear in the data, like

 

Depression 2

Friendship 2

Loneliness 2

Abuse 1

 

I have done this in Excel with CountIfs function, but haven't been able to figure out how to most effectively do it in Power BI.  

 

Kind regards, 

Heidi 

1 ACCEPTED SOLUTION
moumipanja
Employee
Employee

Hi @Anonymous

 

1. Go to Edit Queries -> Select all 3 columns and right click on it -> Unpivot columns -> Close & Apply

2. You have 2 columns in your table now, Attribute & Value. Create a Measure like below and you will get the result.

Measure = COUNTA(Table[Value])

If this answers to your query, please mark this as a solution.

View solution in original post

4 REPLIES 4
moumipanja
Employee
Employee

Hi @Anonymous

 

1. Go to Edit Queries -> Select all 3 columns and right click on it -> Unpivot columns -> Close & Apply

2. You have 2 columns in your table now, Attribute & Value. Create a Measure like below and you will get the result.

Measure = COUNTA(Table[Value])

If this answers to your query, please mark this as a solution.

Anonymous
Not applicable

Thank you so much for taking the time to help me out, works perfectly! 

 

Can I ask why is the measure needed? The solution seems to work even without it? 

 

With kind regards, 

Heidi 

There are several ways to get a particular answer and you are right, the above solution will work without a measure in this case. However. once your data grows and becomes complex in nature, Measures help you perform dynamic calculations in a much better way while interacting with your reports.

Anonymous
Not applicable

Thank you very much moumipanja for helpling me out, I really appreciate it. I will definately look into measures and try to get a hold of them. At the moment everything is still a bit overwhelming with so much to learn! 🙂 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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