Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
v-juanli-msft
Community Support
Community Support

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
v-juanli-msft
Community Support
Community Support

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.

Thank you!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.