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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Nachospt
Frequent Visitor

METHODs TO CARRY OUT DATA AGGREGATION USING DIRECT QUERY?

Here it is the situation.

 

  • I started using POWER BI short ago and have just implemented DIRECT QUERY.
  • I know some DAX (not much) and dont know about "M", POWER QUERY formulae.
  • I have read i can't create calculated columns (DAX), and just can use "add custom column" that comes down to POWER QUERY formulae.

 

I want know the simplest way to handle aggregated/Grouped data. If menu buttons can work it out (instead of coding) better. I need to calculate ranking scores, filter according to these and probably also filter according dynamics dates/indexes.

 

Here my questions:

  • Is it mandatory to learn "M" POWER QUERY formulae to do this?
  • Is it posible to create costum columns using other custom columns in the formulae (much like measures/new columns work without DIRECT QUERY)?
  • Is it a good idea to create new related subtables (that summarize) using "Group by" option in edit query? is it better to add a custom column in the same table (with rows in the same category having the same value)?
  • New tables seems simpler but i might need then M-M relationships and bidirectional cross filtering, right? Does this affect the performance of the final application?

 

I hope i could express my questions clear enough. Just ask if need further explanation.

Thanks for your attention

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Nachospt,

 

  • Is it mandatory to learn "M" POWER QUERY formulae to do this?

No. You can also open Query Editor, then use Group By button to group data based on prefer field.

 

q3.PNG

 

Or you needn't to do anything about data model, you can only place those fields in the table visual and check aggregate function like this:

 

q1.PNGq2.PNG

 

 

 

  • Is it posible to create costum columns using other custom columns in the formulae (much like measures/new columns work without DIRECT QUERY)?

In DirectQuery, it's also possible to create a measure and calculated column using DAX. You can take a look at this article: Ability to create measures when using DirectQuery mode.

 

  • Is it a good idea to create new related subtables (that summarize) using "Group by" option in edit query? is it better to add a custom column in the same table (with rows in the same category having the same value)?

 

Yes, we can use "Group by" in edit query to group data, then build relationship betwene this new table with fact table. In my opinion, "Group by" is better.

 

  • New tables seems simpler but i might need then M-M relationships and bidirectional cross filtering, right? Does this affect the performance of the final application?

In DirectQuery, relationship filtering is limited to a single direction, rather than both directions. You can use SQL Sevrer Profiler to minitor backend query execution time when you filter or refresh data. Also please take a look at Limitations of DirectQuery and Important considerations when using DirectQuery sections in this article: Use DirectQuery in Power BI Desktop.

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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-qiuyu-msft
Community Support
Community Support

Hi @Nachospt,

 

  • Is it mandatory to learn "M" POWER QUERY formulae to do this?

No. You can also open Query Editor, then use Group By button to group data based on prefer field.

 

q3.PNG

 

Or you needn't to do anything about data model, you can only place those fields in the table visual and check aggregate function like this:

 

q1.PNGq2.PNG

 

 

 

  • Is it posible to create costum columns using other custom columns in the formulae (much like measures/new columns work without DIRECT QUERY)?

In DirectQuery, it's also possible to create a measure and calculated column using DAX. You can take a look at this article: Ability to create measures when using DirectQuery mode.

 

  • Is it a good idea to create new related subtables (that summarize) using "Group by" option in edit query? is it better to add a custom column in the same table (with rows in the same category having the same value)?

 

Yes, we can use "Group by" in edit query to group data, then build relationship betwene this new table with fact table. In my opinion, "Group by" is better.

 

  • New tables seems simpler but i might need then M-M relationships and bidirectional cross filtering, right? Does this affect the performance of the final application?

In DirectQuery, relationship filtering is limited to a single direction, rather than both directions. You can use SQL Sevrer Profiler to minitor backend query execution time when you filter or refresh data. Also please take a look at Limitations of DirectQuery and Important considerations when using DirectQuery sections in this article: Use DirectQuery in Power BI Desktop.

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

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

Thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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