Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213819

Counting occurence of string over many columns

$
0
0

I have 30 columns and want to count the occurances of 5 different strings across the entire table, and then to weight those occurences from 1-5.

 

I can really only think of creating 30 measures to count the occurences in each column individually (and weight them accordingly), and then to sum up the measures.  Or one gigantic nested measure.  Both are too laborious to even tackle (and will probably take a long time to resolve once it's done...)

 

Is there a way to create one simple measure for this?  Or even a new calculated column that counts the occurences across each row?

 

Think of a table where every column is a question from a survey, and every row makes up a respondant's selections.    I want a total "score".  To accomplish this in PBI in the past, I manipulated the excel file so that there were three columns.  Respondant, Question and Response.  One column with all the responses makes for a long column, but only requires one simple measure.  But this excel manipulation (transposing and using index() function) is just as laborious as creating 30 measures (and I have to redo it every time a new survey comes about!).

 

As a novice, I really struggle coming from Excel where I could perform calulcations on rows too, not just columns. 


Viewing all articles
Browse latest Browse all 213819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>