Forum Discussion
Appended Table Summarised Results - Count a distinct value by ROW
Hey Datastud3nt ,
you can solve your problem by creating a new measure for each of the summary colums and use the following DAX code as example:
COUNT_STRONGLY_AGREE =
var q1 = CALCULATE(COUNT(ANSWERS[Question1]), ANSWERS[Question1]="Strongly Agree")
var q2 = CALCULATE(COUNT(ANSWERS[Question2]), ANSWERS[Question2]="Strongly Agree")
var q3 = CALCULATE(COUNT(ANSWERS[Question3]), ANSWERS[Question3]="Strongly Agree")
var q4 = CALCULATE(COUNT(ANSWERS[Question4]), ANSWERS[Question4]="Strongly Agree")
var q5 = CALCULATE(COUNT(ANSWERS[Question5]), ANSWERS[Question5]="Strongly Agree")
var q6 = CALCULATE(COUNT(ANSWERS[Question6]), ANSWERS[Question6]="Strongly Agree")
var q7 = CALCULATE(COUNT(ANSWERS[Question7]), ANSWERS[Question7]="Strongly Agree")
var q8 = CALCULATE(COUNT(ANSWERS[Question8]), ANSWERS[Question8]="Strongly Agree")
return q1+q2+q3+q4+q5+q6+q7+q8
This calculates the sum of Strongly Agree as answers. Add it as extra colum in your table visual and you'll see the result.
If this suggestions helps you please mark it as solution.
Hi iceparrot thanks for your reply, however my dataset is an employee survey with 60 columns- that's why I wanted to create 4 different measures or columns and display the counts BY ROW.
The results of those 4 new columns will then feed another piece of analysis that will provide 'SENTIMENT' of the survey (based on the counts of agree/disagree/etc) -each employee will get a 'Sentiment Result' with values like positive, negative, slightly negative, sliglty positive or 50/50).
If that was done in excel the formula would be as simple as : COUNTIFS(ROW RANGE ,"VALUE")