Forum Discussion
MDR
3 years agoFrequent Visitor
Convert SQL query to a DAX measure, calculate sum for distinct values in another column
What is an equivalent DAX measure for the following SQL query: select sum(amount) from (select distinct srcid, amount from mytable where datanameshort='name' and status = 'status');
MDR
3 years agoFrequent Visitor
SUMX (VALUES('Table'[Amount] ), CALCULATE(DISTINCT('Table'[Scrid] ), 'Table'[datanameshort]="name'"&& 'Table'[status] = "status"))