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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Edgar_massa
Helper II
Helper II

Context transition

Hello

Good morning everybody

I have a problem here.

The situation is very simple, I have a CNPJ from a company where 2 employees (cousins) work there and provide services to me, each month I compare the contract hour, contract value with what they are issuing in the invoice for me to pay .

I have a table where the contract per employee brings the sum of value and hour etc.. however, in the result of the table, I would like it to only add the contract value/contract hour once, as I add up the hours of the contract with the legal entity, and not the employees of that company

How do I change the context of the calculation to the final result in the table?

 

Edgar_massa_0-1715587031911.png

I need you to bring me the result of 181.87 + 176 and not 715.73

 

5 REPLIES 5
Anonymous
Not applicable

Hi @Edgar_massa,

So you mean you only want to calculate one time per group? According to the snapshot, the current records include two similar results per category.
For this scenario, I'd like to suggest you add an if statement to check the current row contents level, then you can divide 2 if current is calculate on the final result level.

Clever Hierarchy Handling in DAX - SQLBI

Regards,

Xiaoxin Sheng

Edgar_massa
Helper II
Helper II

Hi @Edgar_massa,

I already took a look at your file but I can't understand your model yet. You have a huge Dax measure because the way you build your model.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




_AAndrade
Super User
Super User

Hi @Edgar_massa;

Could you please share a pbix with some data so I can take a look?





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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