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

DAX vs SQL

Hello every one,
I've getting dificulties to create some data structures with DAX. But with SQL no problem at all.
Can somebody tell me if there is any problem to bring data from database already treated and ready to create the visuals?
I mean, what is better, filter and group data using a sql statement directely in advanced options, when we are getting data from database, or just bring the tables from database and make the filters and grouping with dax?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: DAX vs SQL

Hi @LeonardoTIPrime 

"filter and group data" is possible in Power BI with Power Query inside Edit queries or use DAX.

 

If the data should be filtered and grouped before importing to Power BI, it is better to do that in SQL side.

 

If the data you need to import to Power BI should be original, then you need to filter and group data so that you could create expected visual.

In this case, If you have many purposes,

for one purpose, you need to filter and group data in one way,

for another one, you need to filter and group data in another way,

it is better to import all needed data into Power BI, then filter and group data in Power BI.

 

If you have problem to filter and group data in Power BI, don't worry, share your example data and expected result table in the forum, others users or engineers would provide useful help.

 

Reference you could learn:

Group with Power Query

How to Group by in Power Query - Part 3: Power Query Challenge

Power BI Query Editor Filters

GROUPBY – aggregations in data model using DAX (DAX – Power Pivot, Power BI)

Filter Data in DAX Formulas

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Community Support Team
Community Support Team

Re: DAX vs SQL

Hi @LeonardoTIPrime 

"filter and group data" is possible in Power BI with Power Query inside Edit queries or use DAX.

 

If the data should be filtered and grouped before importing to Power BI, it is better to do that in SQL side.

 

If the data you need to import to Power BI should be original, then you need to filter and group data so that you could create expected visual.

In this case, If you have many purposes,

for one purpose, you need to filter and group data in one way,

for another one, you need to filter and group data in another way,

it is better to import all needed data into Power BI, then filter and group data in Power BI.

 

If you have problem to filter and group data in Power BI, don't worry, share your example data and expected result table in the forum, others users or engineers would provide useful help.

 

Reference you could learn:

Group with Power Query

How to Group by in Power Query - Part 3: Power Query Challenge

Power BI Query Editor Filters

GROUPBY – aggregations in data model using DAX (DAX – Power Pivot, Power BI)

Filter Data in DAX Formulas

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

LeonardoTIPrime Frequent Visitor
Frequent Visitor

Re: DAX vs SQL

Thank you!