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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Matrix is using a calculated group. A and B are two different measures. Is it possible to have a calculated item that does A-B?
Hello shooyi,
Are you looking for it to subtract A and B specifically? Does Measure = A - B not work? I must be missing something here!
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
Proud to be a Super User! | |
Hi Wilson
I created a calculated group because I needed the same 5 custom calculations applied to whatever measure I drop in.
What is in the table is the YoY %. So A is the YoY growth for measure A and B is the YoY growth for measure B for a client defined time metric.
But I need A and B to able to be applied to the sum of any column.
Example :
A could be the sum(company_a_sales) or sum(company_a_units)
B could be the sum(company_b_sales) or sum(company_b_units)
What I was trying to do is the 5 custom calculations (client defined rolling metrics a, b, c, d, e) and have it use selectedmeasure() instead of creating 30 measures.
So I would be able to use :
rolling_metric_a - using selectedmeasure()
as opposed to
rolling_metric_a for each column
| year | week | product | company_a_sales | company_a_units | company_b_sales | company_b_units | company_c_sales | company_c_units |
| 1 | 4 | xx | 123 | 53 | 456 | 78 | 789 | 45 |
| 1 | 5 | yy | 321 | 35 | 654 | 87 | 987 | 54 |
| 2 | 4 | xx | 852 | 25 | 147 | 41 | 369 | 63 |
| 2 | 5 | yy | 963 | 63 | 753 | 35 | 159 | 15 |
This works just fine. Now I need to be able to subtract the two. So in the original post that is the rolling_metric_a applied to sum(company_a_sales) and sum(company_b_sales).
I now need the difference between the two.
Is it possible to create a calculated item that subtracts the two?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |