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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Florian_Kluge
Regular Visitor

Combining Addcolumns, Related, Summarize and Calculatetable

Dear all,

 

I'm quite new to Power BI and try to deal with DAX more and more.

 

I would like to create a virtual Table with the following step and the 3rd step failed:

 

var Price_Index1 = ADDCOLUMNS('Price Index',"Quarters_from_now",related('Price Index Quarters'[Quarters from now]))
var Price_Index2 = SUMMARIZE(Price_Index1,'Price Index'[Material No], [Quarters_from_now], 'Price Index'[Quarter Year], 'Price Index'[Price],'Price Index'[Qty])
var Price_Index3 = CALCULATETABLE(Price_Index2, Quarters_from_now>3)
return Price_Index3

 

What did I wrong?

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Florian_Kluge , Try with these change , a new table

 

var Price_Index1 = ADDCOLUMNS('Price Index',"Quarters_from_now",related('Price Index Quarters'[Quarters from now]))
var Price_Index2 = SUMMARIZE(Price_Index1,Price_Index1[Material No], Price_Index1[Quarters_from_now], Price_Index1[Quarter Year], Price_Index1[Price],Price_Index1[Qty])
var Price_Index3 = CALCULATETABLE(Price_Index2, Price_Index2[Quarters_from_now]>3)
return Price_Index3

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
PaulDBrown
Community Champion
Community Champion

Does this work?

New Table =
SUMMARIZE (
    FILTER ( 'Price Index', 'Price Index Quarters'[Quarters from now] > 3 ),
    'Price Index'[Material No],
    'Price Index Quarters'[Quarters from now],
    'Price Index'[Quarter Year],
    'Price Index'[Price],
    'Price Index'[Qty]
)




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi @PaulDBrown : Thanks a lot, this also helps if I put the 

'Price Index Quarters'[Quarters from now]  in the related function.

Thanks

amitchandak
Super User
Super User

@Florian_Kluge , Try with these change , a new table

 

var Price_Index1 = ADDCOLUMNS('Price Index',"Quarters_from_now",related('Price Index Quarters'[Quarters from now]))
var Price_Index2 = SUMMARIZE(Price_Index1,Price_Index1[Material No], Price_Index1[Quarters_from_now], Price_Index1[Quarter Year], Price_Index1[Price],Price_Index1[Qty])
var Price_Index3 = CALCULATETABLE(Price_Index2, Price_Index2[Quarters_from_now]>3)
return Price_Index3

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak: Thanks a lot, now I see it more a matter of the AutoCompletion, which does not present the column names of virtual tables

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors