Forum Discussion
jainesh12
3 years agoFrequent Visitor
SQL Query to DAX
SELECT customer_id, SUM(amount) AS total_sales FROM orders GROUP BY customer_id; How can I convert it to a DAX function? Is there any AI tool that converts SQL queries to DAX functions? (Except...
tamerj1
3 years agoCommunity Champion
Hi jainesh12
If you are creting a measure then simply
total_sales = SUM ( Orders[Amount] )
If you want to create a calculated table
OrdersByCustomer =
SUMMARIZE ( Orders, Orders[Customer_id], "total_sales", SUM ( Orders[Amount] ) )