Forum Discussion
How to count from multiple columns?
Hi everybody, please I need some help with this
In my data I have a column with multiple values separated by commas (they are invoice observations)
I want to show a pie chart counting values including each value from the cells with multiple values
So far I used the split column option and created new rows but this makes me have to separate the report from differente charts. Is there any way I can count from the chart by splitting the values in diferent columns or count not splitting the columns?
Thank you so much
3 Replies
- amitchandakSuper User
jlsayan , To be used on Axis, You need a column.
So another option is to have an independent table(Say Cat) with all column values(Splited single values), not join to this table
Sumx(Table, Calculate(Countx(filter(Cat, Search(Cat[Cat], Table[Column],,0) >0) ), Table[Column]) )
- jlsayanNew Member
Thank you for your reply, please if you could clarify for me the formula, this would be the example:
I understand you are saying create a different table (Cat) to split the category in multiple columns like the picture. Then add a column at the end of the firt table with the formula:
column=Sumx(Table, Calculate(Countx(filter(Cat, Search(Cat[Category1], Table[Category],,0) >0) ), Table[Category]) ), when putting this power BI does not let me refference table inside the search function only the cat table, also where would I include the other category columns?
Very appreciated for your help
- AnonymousNot applicable
Hi jlsayan ,
What's your expected result? Could you please provide some sample data and some special examples to explain the logic of your requirement? Thank you.
In addition, please review the following links. Hope they can help you.
Split Comma delimited Columns / Cells into Multiple rows Power BI Desktop Tips and Tricks
Reporting Using Multi-Value Fields in Power BI
Best Regards