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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Anonymous
Not applicable

Understanding Agg tables

I am trying to get my head around using agg tables to improve DirectQuery response times.

 

Following guides by Microsoft, Radacad and others I have created a very basic model with a Fact table (Assignments) related to a Projects Dimension (by ProjectID - many to one) and a Date Dimension (by TimeByDay - many to one).  I used PowerQuery to create an Aggregated copy of the Assignments table grouped by TimeByDay and ProjectID and summing Assignment Work.  This Agg table has the same relationships to the Dimension tables.

 

I have set up the Aggregation mappings and set the Dimension tables to Dual mode and the Agg to Import (original Assignments table remains DirectQuery)

 

Agg relationships.png

 

Checking with just a couple fields in a table all seems fine and queries are clearly hitting the agg table with instant results instead of waiting a minute or more.  An Agg table column with any column from the Date table works as expected.  However, the table shows a single row with a blank value for any column from the Projects table.

 

Agg Results.png

 

I'm expecting that I have missed something obvious but I cannot understand why there is a different behaviour for the same kind of relationship between the Fact and Dimension tables.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Your comment actually did help, problem seems to just be down to curly braces { 🤔😵 }.  I have never really noticed nor cared before that they are added around the Id text values for some reason by DirectQuery:  Direct Query adding curly brackets to Test GUID Fi... 

 

Since the Agg table is in Import mode it's ProjectId values lack the curly braces.  So any query hitting the Agg table gets no matches for that relationship (queries on the Fact table that don't hit the agg table use the Fact table Ids which still have braces and so work fine)

 

Solution is adding braces to the Agg table ProjectId (or setting up the Agg in DQ mode but who would want that?)

 

Would appreciate any further info as this soaked up a lot of time even though the fix is a simple one. Is this just a bug or is there a good reason for the additional characters?

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

So that generally means that there are non-matching records in relationships. Not sure how else to help.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

All the ProjectIDs have a match across the tables, the visuals work (slowly) without the agg table setup.
(for my sanity triple checked via copying the columns to Excel to confirm all 1M match in the original table and all 100k in the agg)
Anonymous
Not applicable

Your comment actually did help, problem seems to just be down to curly braces { 🤔😵 }.  I have never really noticed nor cared before that they are added around the Id text values for some reason by DirectQuery:  Direct Query adding curly brackets to Test GUID Fi... 

 

Since the Agg table is in Import mode it's ProjectId values lack the curly braces.  So any query hitting the Agg table gets no matches for that relationship (queries on the Fact table that don't hit the agg table use the Fact table Ids which still have braces and so work fine)

 

Solution is adding braces to the Agg table ProjectId (or setting up the Agg in DQ mode but who would want that?)

 

Would appreciate any further info as this soaked up a lot of time even though the fix is a simple one. Is this just a bug or is there a good reason for the additional characters?

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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