Forum Discussion
RooneyHat
5 years agoFrequent Visitor
Count Multiple Choice Text field occurrences from Multiple Columns.
Hi Everyone, Apologies if this has been answered before, I'm new to PowerBi and I haven't been able to find a solution. I have a SharePoint list and am attempting to count every text occurrenc...
- 5 years ago
Hi RooneyHat ,
You could try the following steps:
Step 1,create a slicer table:
Step 2,use the following measure on base table:
sum = CALCULATE ( COUNT ( 'Table'[Objective Choice 1] ), FILTER ( ALL ( 'Table' ), 'Table'[Objective Choice 1] = SELECTEDVALUE ( Slicer[Color] ) ) ) + CALCULATE ( COUNT ( 'Table'[Objective Choice 2] ), FILTER ( ALL ( 'Table' ), 'Table'[Objective Choice 2] = SELECTEDVALUE ( Slicer[Color] ) ) ) + CALCULATE ( COUNT ( 'Table'[Objective Choice 3] ), FILTER ( ALL ( 'Table' ), 'Table'[Objective Choice 3] = SELECTEDVALUE ( Slicer[Color] ) ) ) + CALCULATE ( COUNT ( 'Table'[Objective Choice 4] ), FILTER ( ALL ( 'Table' ), 'Table'[Objective Choice 4] = SELECTEDVALUE ( Slicer[Color] ) ) ) + CALCULATE ( COUNT ( 'Table'[Objective Choice 5] ), FILTER ( ALL ( 'Table' ), 'Table'[Objective Choice 5] = SELECTEDVALUE ( Slicer[Color] ) ) )Then create visualization:
You could download my pbix file to learn more details,wish it is helpful for you!
Best Regards
Lucien
v-luwang-msft
5 years agoCommunity Support
Hi RooneyHat ,
You could try the following steps:
Step 1,create a slicer table:
Step 2,use the following measure on base table:
sum =
CALCULATE (
COUNT ( 'Table'[Objective Choice 1] ),
FILTER (
ALL ( 'Table' ),
'Table'[Objective Choice 1] = SELECTEDVALUE ( Slicer[Color] )
)
)
+ CALCULATE (
COUNT ( 'Table'[Objective Choice 2] ),
FILTER (
ALL ( 'Table' ),
'Table'[Objective Choice 2] = SELECTEDVALUE ( Slicer[Color] )
)
)
+ CALCULATE (
COUNT ( 'Table'[Objective Choice 3] ),
FILTER (
ALL ( 'Table' ),
'Table'[Objective Choice 3] = SELECTEDVALUE ( Slicer[Color] )
)
)
+ CALCULATE (
COUNT ( 'Table'[Objective Choice 4] ),
FILTER (
ALL ( 'Table' ),
'Table'[Objective Choice 4] = SELECTEDVALUE ( Slicer[Color] )
)
)
+ CALCULATE (
COUNT ( 'Table'[Objective Choice 5] ),
FILTER (
ALL ( 'Table' ),
'Table'[Objective Choice 5] = SELECTEDVALUE ( Slicer[Color] )
)
)
Then create visualization:
You could download my pbix file to learn more details,wish it is helpful for you!
Best Regards
Lucien
RooneyHat
5 years agoFrequent Visitor
Thanks this helped!