Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
HI All
have created some calculation groups in PBI with Tabular editor. I want to create some calculation, with this technique, to calculated some differencies, percentages,.... of measures/values, that are already defined in same or other calculation group.
The question is, if it is posible, to use/reference another calculation item, previosly defined. For example, if i have created a calculation group A, and within it a calculation item X and Y, and want to calculate a difference and percentage of X and Y. Do i have to write the same expresion for calculation item Z (which should be eqaul to X-Y), or can i reference somehow the previously defined items X and Y?
thank you
Solved! Go to Solution.
You can reference the previously defined items, you can even have multiple calculation groups as long as you set the precedence properly.
To refer to a particular calculation item you can use TREATAS, e.g.
Measure Z =
var resultX = CALCULATE( [Base measure], TREATAS( { "X" }, 'Calculation Group'[Calculation Item]) )
var resultY = CALCULATE( [Base measure], TREATAS( { "Y" }, 'Calculation Group'[Calculation Item]) )
return DIVIDE( resultX, resultY )
You can reference the previously defined items, you can even have multiple calculation groups as long as you set the precedence properly.
To refer to a particular calculation item you can use TREATAS, e.g.
Measure Z =
var resultX = CALCULATE( [Base measure], TREATAS( { "X" }, 'Calculation Group'[Calculation Item]) )
var resultY = CALCULATE( [Base measure], TREATAS( { "Y" }, 'Calculation Group'[Calculation Item]) )
return DIVIDE( resultX, resultY )
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!