Forum Discussion
yasbui
8 years agoFrequent Visitor
SQL to DAX conversion
Hi all I've got quite a heavy SQL query and need help on getting the DAX equivalent. Any responses would be appreciated: select sum(lost_sales) as lost_sales, event from (select event, creat...
v-yuta-msft
8 years agoCommunity Support
Hi yasbui ,
Here I list some points like below which may help you:
"summarize(with aggregation nested)" in dax is equal to "select ... from ... group by ..." in sql
"summarize(without aggregation nested)" in dax is equal to "select ... over(partition by ...) from ..." in sql
"order by" in dax is equal to "order by" in sql
"filter(table, condition)" in dax is equal to "where" in sql
"union" in dax is equal to "union all" in sql
"rank(dense)" in dax is equal to "row_number()" in sql
"format([date], "YYYY-MM-DD")" in dax is equal to "TO_DATE" in sql
"now()" in dax is equal to "current_timestamp()" in sql
More details please refer to: From-SQL-To-DAX, DAX-Function-Reference.
Hope it's helpful to you.
Regards,
Jimmy Tao