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
hideakisuzuki01
Helper II
Helper II

Need help understanding Context Transition

Hi, 
I have below two tables (Fact and ProductDim) 

Fact  ProductDim 
ProductSales ProductSalesPerson
A100 AJames
A200 BChris
B300 CSteve
B400   
B500   
C600   

 

I want to add a calculated column in the ProductDim or measure that calculates total sales amount for each product.

 

Calculated Column1 ->   TotalSales1 = SUM('Fact'[Sales])

Calculated Column2 ->   TotalSales2 = CALCULATE(SUM('Fact'[Sales]))

Measure                    ->   TotalSales3Measure = SUM('Fact'[Sales])

 

When I use them in a table , the result is this

hideakisuzuki01_0-1667366986118.png

My question is, why is "TotalSales3Measure" calculates the sales amount correctly when there is no row context?  

Below is my understanding:

"TotalSales1" does not work correctly because there is no CALCULATE and so context transition does not occur.

"TotalSales2" works correctly because there is CALCULATE and row context (because its a calculated column) so context transition occurs. 

But in case of "TotalSales3Measure", there is an invisible CALCULATE(because its a measure) but there is no row context, right ?

So does context transition occur in this case ? 

 

 

 

2 REPLIES 2
hideakisuzuki01
Helper II
Helper II

Thanks jd !
Can you also tell me if I understand this correctly regarding "TotalSales2" ?

"TotalSales2" works correctly, because there is a CALCULATE function, so it follows relationship between the two tables.

And it follows the relationship because of context transition.
Is this correct ?

 

Or Context transition has nothing to do with following the relationship, and CALCULATE forces the table relationship active ?

 

 

jdbuchanan71
Super User
Super User

No, measure 3 has a filter context.  Context transition takes a row context and converts it to a filter context.  Filter context is the more common context in models.  Row context comes in when you are iterating over a table (calculated columns, SUMX, AVERAGEX, etc)  and that is where you need the context trasition forced by CALCULATE or the hidden CALCULATE on an exising measure.

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