Forum Discussion

rkee10's avatar
rkee10
Frequent Visitor
2 years ago
Solved

Grouping of Questions to Create Category

Is it possible to create a report from a list of questions wherein it will group the type of questions as categories?  For example, i have these questions:   - What is a guitar - Guitar - define ...
  • qqqqqwwwweeerrr's avatar
    qqqqqwwwweeerrr
    2 years ago

    Hi rkee10 

     

    If my understanding is correct then here are the step, to achieve what you have you need to create two custom column

    First column

    NewColumn =
    VAR Sentence = 'Table'[Sentence]
    VAR WordList =
    SELECTCOLUMNS(
    UNION(
    ROW("Word", "guitar"),
    ROW("Word", "cook")
    -- Add more words here as needed
    ),
    "Word", [Word]
    )
    VAR FoundWords =
    FILTER(
    WordList,
    CONTAINSSTRING(Sentence, [Word])
    )
    RETURN
    CONCATENATEX(FoundWords, [Word], ", ")
     
    Second column:
    CountColumn =
    CALCULATE(
        COUNTROWS('Table'),
        FILTER('Table', 'Table'[NewColumn] = EARLIER('Table'[NewColumn]))
    )
     
    Here is below output for the same
     

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
    Check for more intersing solution here: www.youtube.com/@Howtosolveprobem

    Regards