cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Help with DAX form an horrible written SQL istruction with bad english

Hello community,

 

I'm pretty new both SQL and DAX but i want understand how can i translate queries. I have to calculate a difference of totals filtering by start month of a task and end month of task.

Steps are:

 

table2
select count(*)
from table0
group by column end date month

 

table1
select count(*)
from table0
group by colum start date month

 

Table definitive

select *
from join table1 to table2

where month is equal

 

Is doable via DAX?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IX
Super User IX

Re: Help with DAX form an horrible written SQL istruction with bad english

So, the DAX function SUMMARIZE would be used to do what GROUP BY does in SQL and you could use NATURALINNERJOIN potentially for you table join or just create a relationship between the two tables. But, I am wondering if you really want to do this in Power Query (M).


---------------------------------------

Not link spamming! If I posted a link in reply it is because I did assume you know how to search the web but thought it was the fastest way to fix your issue.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
Highlighted
Super User IX
Super User IX

Re: Help with DAX form an horrible written SQL istruction with bad english

So, the DAX function SUMMARIZE would be used to do what GROUP BY does in SQL and you could use NATURALINNERJOIN potentially for you table join or just create a relationship between the two tables. But, I am wondering if you really want to do this in Power Query (M).


---------------------------------------

Not link spamming! If I posted a link in reply it is because I did assume you know how to search the web but thought it was the fastest way to fix your issue.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors