cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmctann Frequent Visitor
Frequent Visitor

Create a clustered column chart from counting text values in various columns

I am trying to create a clustered column chart that shows the count of each score from 9 different categories: 

 

SAF           W            M           SYS       ERM     ENV         COM        ET        SCH

EHEEHEEEEEE
HEEHEEEEHEEE
ENEENENEEEEE
EEEEEEHEEE
EEEEHEEHEHEE
NEEEEEEEEE
NEEEEEEHEEE
EEENEEEEEE
ENEENEEEEHEE
NEHEEEHEEEEE
ENEENENEEEEE
EEEEHEEEEE
NENENENEEEEEE
ENEENENEEEEE
ENEHEEEEEEE
EEEEHEEEEE
ENEEEEENEEE
EEENEHEENEHEE
NEEEEEEEEE
ENEEEEEEEE
ENEEEEEEEE
EEEEEEHEENE
NENEEEHEEENEE
EEEEEEEHEE
NEEEEEEEEE
NENEEEEENEEE
NEEENEEEHENEE
EEENEEEENENE
EEEEEEEHEE
EEHENEEEEEE
NEEEENEEEEE
NEEEEHEEEEE
EEEEEENEEE
EEEENEEEENE
EEEHEEEEEE
ENEEEEENEEE
NEEEEEEEHEE
EEENEEEEEE
HEEEEEEEEE
EUSENENEEEEE
ENEEEEEHEEE
EEEEEEEEE
NEEEEEEEEE
EEENEEEEHEE
EUSENENEEEEE
USNEEEEEEEE
EEEEEENEEE
ENEEEEEEEE
NEEEEHEEEEE
NEEENEEEEEE
EENENEEEEEE
EEHEEHEEEEE
NEEEEEEEEE
NEEEEEEEEE
EEEEEENEEE
NEEEEEEEEE
EHEEEEEHEEE
NENEENEEEENEE
EEEEHEEEEE
EEEEEEEEE
EHEEEEEEEE
ENEEEEENEE
HEEEEEENEEE
EEEEEEEEE
EUSEEEEENEE
HEEHEEEEEEE
NEEEEEEEEE
EEHEEEEEEE
NEUSEENEEEEE
EEENEEEENEE
NEEEEEEEEE
NEEHEEEEEEE
NEEHENEEEEEE
NEEEEEENEEE
NEEHENEEEEEE
USEEHEEEEEE
EUSENENEEEEE
NEEEEEEHEHEE
NEEENEEEEEE

 

I've tried pivoting, unpivoting, summarizing, creating measures that count the 5 scores (HE, E, N, NE, US) in each category and then throwing them all into the various fields but it never turns out how I want it. I want the categories (top) to be on the axis, and a count of the various scores for each category to be the bars. How can I achieve this?  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Create a clustered column chart from counting text values in various columns

Hi @cmctann,

 

For your requirement, you could unpivot all your columns and change the Attribute to Category then you will get the table like this .

 

unpivot.PNG

 

Then you could create the measures below.

 

E = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="E"))
HE = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="HE"))
N = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="N"))
NE = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="NE"))
US = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="US"))

Then you could create the visual below.

 

Capture.PNG

 

More details, please refer to this attachment.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Community Support Team
Community Support Team

Re: Create a clustered column chart from counting text values in various columns

Hi @cmctann,

 

For your requirement, you could unpivot all your columns and change the Attribute to Category then you will get the table like this .

 

unpivot.PNG

 

Then you could create the measures below.

 

E = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="E"))
HE = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="HE"))
N = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="N"))
NE = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="NE"))
US = CALCULATE(COUNT(Table1[Value]),FILTER('Table1','Table1'[Value]="US"))

Then you could create the visual below.

 

Capture.PNG

 

More details, please refer to this attachment.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cmctann Frequent Visitor
Frequent Visitor

Re: Create a clustered column chart from counting text values in various columns

v-piga-msft That worked! Thank you so much!

Community Support Team
Community Support Team

Re: Create a clustered column chart from counting text values in various columns

Hi @cmctann ,

 

It's glad that we can help.

 

Please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.