Forum Discussion

IanErler's avatar
IanErler
Regular Visitor
6 years ago
Solved

Google Form Graph

Hello, I started with learning how to use Power BI recently. And I'm having trouble reconstruction a certain graph. I've used google forms for my survey and exported the data to a .xls file. There ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi IanErler,

    It seems like you are trying to expand all text string and get the detail count of each item, right? If this is the case, you can take a look at the following link about the similar requirements:
    Occurrence of value (or) count value(text) in a column 

     

    NEW Table =
    VAR _path =
        SUBSTITUTE ( CONCATENATEX ( ALL ( 'Table'[Text] ), [Text], "," ), ",", "|" )
    VAR _length =
        PATHLENGTH ( _path )
    VAR _pathtable =
        ADDCOLUMNS (
            GENERATESERIES ( 1, _length, 1 ),
            "Text", PATHITEM ( _path, [Value] )
        )
    RETURN
        ADDCOLUMNS (
            SUMMARIZE ( _pathtable, [Text] ),
            "Count", COUNTROWS ( FILTER ( _pathtable, [Text] = EARLIER ( [Text] ) ) )
        )
    

     

    Regards,

    Xiaoxin Sheng