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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
TMJForrester
Advocate I
Advocate I

User-Defined Aggregations with Power BI Dataset as DQ Source

Does anyone know if it's possible to create a user-defined aggregation, where the Direct Query source is another Power BI dataset? All the previous forum posts I've read about this weren't very clear on answering this question, so I was hoping to get a definitive answer from someone who knows whether or not this is feasible (and hopefully save other people some time in case they also want to know).

 

My gut says no, but now that DQ over PBI datasets/AAS models has been GA for quite a while, my fingers are crossed that I'm wrong. Personally, I'd love the ability to aggregate my very large enterprise models in a specific report, especially in cases where that report only needs a small amount of data from the enterprise model.

 

 

User-defined aggregations - Power BI | Microsoft Learn

 

Announcing general availability for composite models on Power BI Datasets and Analysis Services mode...

1 ACCEPTED SOLUTION

Sorry. My bad as it is possible to use summary SQL view as the aggregation table. Now, based on testing it seems possible. I used a summary imported table as the agg table and check on the DAX query generated. A portion of it is referencing the aggregation table but I did use the column the DQ-AAS table.

GROUPCROSSAPPLY(
		TREATAS(DEPENDON(_Var2, EARLIER(_T39[Value], 2)), 'f_AggTable'[Last Characters]),
		GROUPCROSSAPPLY(
		TREATAS(DEPENDON(_Var2, EARLIER(_T39[Value], 2)), 'f_AggTable'[Last Characters]),
		"__Agg0", SUMX('f_AggTable','f_AggTable'[Amount])
	)"__Agg0", SUMX('f_AggTable','f_AggTable'[Amount])
	)
)

 

 

After disabling the aggregation, these lines disappeared. The visual also refreshed and was noticeably slower.

danextian_0-1728343830206.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @TMJForrester 
I don't think that it's possible. There's no option to manage aggregations on DQ semantic model.

danextian_0-1728281111204.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Aren't you supposed to click Manage Aggregation on the imported table? I might be wrong, but I think you're trying to look for that option on the Direct Query table.

 

To be clear, this question is relevant for a composite model. Below is a screenshot of a sample data model diagram if that helps. Note the tables with the blue highlights are DQ from another Power BI dataset, and the "Aggregation" table on the left is an imported table.

 

TMJForrester_0-1728317628198.png

 

Sorry. My bad as it is possible to use summary SQL view as the aggregation table. Now, based on testing it seems possible. I used a summary imported table as the agg table and check on the DAX query generated. A portion of it is referencing the aggregation table but I did use the column the DQ-AAS table.

GROUPCROSSAPPLY(
		TREATAS(DEPENDON(_Var2, EARLIER(_T39[Value], 2)), 'f_AggTable'[Last Characters]),
		GROUPCROSSAPPLY(
		TREATAS(DEPENDON(_Var2, EARLIER(_T39[Value], 2)), 'f_AggTable'[Last Characters]),
		"__Agg0", SUMX('f_AggTable','f_AggTable'[Amount])
	)"__Agg0", SUMX('f_AggTable','f_AggTable'[Amount])
	)
)

 

 

After disabling the aggregation, these lines disappeared. The visual also refreshed and was noticeably slower.

danextian_0-1728343830206.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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