cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LeonardoTIPrime
New Member

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
Community Support

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.

View solution in original post

2 REPLIES 2
Community Support
Community Support

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.

View solution in original post

LeonardoTIPrime
New Member

Re: DAX vs SQL

Thank you!

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors