Forum Discussion
count value from multiple columns and multiple rows
- 6 years ago
Hi Anonymous
the best way is to use Power Query Mode:
Select by left click + ctrl your columns Competitor1, Competitor2, Competitor2 then right click and Unpivot Only Selected columns.
After, you will have 2 options:
1. Apply data and simply aggregate in visual: Value (new field from previous step) and its count
2. In power query mode right click on Value (new field from previous step) -> Group By then
do not hesitate to give a kudo to useful posts and mark solutions as solution
- 6 years ago
Anonymous
you could create a calculated table
Table = CROSSJOIN(DISTINCT('BIDS Table'[Product]); UNION( SELECTCOLUMNS('BIDS Table';"Competitor";[Competitor1]); SELECTCOLUMNS('BIDS Table';"Competitor";[Competitor2]); SELECTCOLUMNS('BIDS Table';"Competitor";[Competitor3]) ) )then summarize in visual or create a new table
Table Summ = SUMMARIZE('Table';'Table'[Product];'Table'[Competitor];"Number";countrows('Table'))do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi Anonymous
the best way is to use Power Query Mode:
Select by left click + ctrl your columns Competitor1, Competitor2, Competitor2 then right click and Unpivot Only Selected columns.
After, you will have 2 options:
1. Apply data and simply aggregate in visual: Value (new field from previous step) and its count
2. In power query mode right click on Value (new field from previous step) -> Group By then
do not hesitate to give a kudo to useful posts and mark solutions as solution
After Unpivot the infomration seems grouped, but I still need all the 3 columns to be around, I need them for display purpose.
there's remarks against each competitor, as competitor1, remarks1, competitor 2,remarks 2 etc.
I need these columns to display remarks properly later.
What should I do then?
Thank you.