Forum Discussion

mjbernier's avatar
mjbernier
Helper II
7 years ago
Solved

Data format is changing between Power Query and data model

I have a column of data that contains responses to a questionnaire. For some of the questions, the responses are text values (Y, N, N/A), and for others the responses are a numeric scale of 0-10. Her...
  • MFelix's avatar
    MFelix
    7 years ago

    Hi mjbernier ,

     

    Sorry for the confusion, I read it incorrectly your question.

     

    Create the following measure:

     

    Measure =
    AVERAGEX (
        FILTER (
            ADDCOLUMNS (
                GROUPBY ( ALLSELECTED ( Table1 ); Table1[Question]; Table1[Answer] );
                "Number_Answer"; IFERROR ( Table1[Answer] + 0; 0 )
            );
            [Number_Answer] <> 0
        );
        [Number_Answer]
    )

    Should give expected result.

     

    Once again sorry for the incorrect information previouly.

     

    Regards,

    MFelix