locked
dax table expression addcolumns - row - summarize - calculate with filter in ?? RRS feed

  • Question

  • I'm having trouble with the follow dax expressions that is part of a dax created table . When I run it as is it says there is a row expects column in position 5.  I've tried a number of combinations but must be missing something.

    Thanks

    EVALUATE
    ADDCOLUMNS (
    ROW (
    "Test Name", "Welkin Patient Control vs welkin_hierarchy_patients_l5_vw",
    "Expected Value", CALCULATE (
    DISTINCTCOUNT ( 'Patient Control'[patient_id] ),
                    'Patient Control'[ignore_row_flg] = 0
                ),

    summarize(
                 'welkin org Patient',
                 'Patient Control'[patient_id] ),       
    "Actual Value",
    CALCULATE (
    DISTINCTCOUNT ('Patient Control'[patient_id]),
                     'Patient Control'[phase] = "enrolled"
                     ) 
                 )

                )

                                                                                                                                                       
    Tuesday, April 21, 2020 7:13 PM

All replies