Below error message appears when DAX query is selected in the SSAS Dataset.


Query (1, 10) Column [XXXXX] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression.
----------------------------
Query execution failed for dataset 'YYYYY'. (rsErrorExecutingCommand)
----------------------------
An error has occurred during report processing. (rsProcessingAborted)



Change query type to MDX will fix the issue.