Forum Discussion
stjimi
4 years agoFrequent Visitor
Creating a stacked Column chart wiht multiple columns
Hi all, I can't seem to work this out. I want to create a stacked column graph where each column in the graph relates to a column in a table. I want the values in each column to be represented i...
Anonymous
4 years agoNot applicable
Hi stjimi
(1)In Power Query , use Unpivot columns to convert the column name to row value , like the screenshot below . To prevent the same row from being hidden, an additional index column needs to be created .
(2)Create a measure to count the number group by column [Attribute] and [Value] .
Count = CALCULATE(COUNT('Table'[Value]),ALLEXCEPT('Table','Table'[Attribute],'Table'[Value]))
(3)Add a 100% stacked column chart , put column [Attribute] in Axis , [Value] in Legend , [Count] in Values .
The result is as shown :
I have attached my pbix file , you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
stjimi
4 years agoFrequent Visitor
Thanks so much Ailsa
The trouble is that these are calculated columns and so won't let me alter them in pPower Query. Is there a work around?