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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Create column chart from SharePoint Online list

Hi,

I am new to Power BI. I am fetching data from SharePoint Online.

The table looks like:

Soumo777_0-1621601639778.png

I want to make a bar chart with the count of each Theraputic Area (Fertility, Oncology, etc).

To count the occurances I am using a measure:

TA1 = CALCULATE(COUNTROWS('SWDHomeList'),'SWDHomeList'[TherapeuticArea]<>"Neurodegenerative Diseases")
I have created a measure for each Theraputic area.
But the end result is not coming as expected.
Soumo777_1-1621601828073.png

As you can see here all x-axis shows proper values, but the columns are all clustered together, I want one column for each Theraputic Area, something like this:

Soumo777_2-1621604343164.png

I'd appriciate your help, thanks in advance. 

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

Anonymous
Not applicable

Hi @Anonymous 

I am confused about your measure. 

From your statement, you created multiple measures to get the count of each Theraputic Area (TA).

Ex: TA1= Neurodegenerative Diseases

So your measure should use "=" instead of"<>" in filter.

TA1 = CALCULATE(COUNTROWS('SWDHomeList'),'SWDHomeList'[TherapeuticArea] = "Neurodegenerative Diseases")

If you want to count each Therapytic Area in X axis, you can add this column directly in visual and power bi has count function in visual. You don't need to build multiple measures to count.

1.png

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

amitchandak
Super User
Super User

@Anonymous , You have taken more than one measure, that is why is showing all those. Do you want to have a switch to all those measures?

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak ,

I created multiple measures to get the count of each Theraputic Area (TA).

For example TA1= Neurodegenerative Diseases

I am open to a different approach alltogether.

I just want all the diferent TAs on the x-axis and each column sould represent the count of each TA.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors