Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
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 ChatGPT)
Solved! Go to Solution.
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] ) )
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] ) )
@tamerj1 Thank you for the suggestion.
This was just an example, do you know is their any requirement to convert SQL queries to DAX functions?
If yes, please suggest a few scenarios.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 15 | |
| 14 | |
| 9 | |
| 8 | |
| 8 |