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
I have two columns that are calculating row values correctly with these formulas but the latter Site Target GP was not calculating the total properly so i had to modify
Original
Current Revenue = CALCULATE(
SUM(Query1[Column2]),
FILTER(Query1,SEARCH("Current",Query1[Source.Name],,0)),
FILTER(Query1,Query1[Column1]="Revenue")
)
and
Solved! Go to Solution.
Hello @mikekolba1
To calculate the overall total (denoted as "X" in your example), you need to do a weighted average calculation using Current Revenue as the weight.
Instead of directly summing up the percentages, you can use this formula to calculate the total Site Target GP % based on the weighted average
SiteTargetGP_TotalCalc =
IF(
HASONEFILTER(Query1[Site]),[Site Target GP %], -- Use the individual site value
DIVIDE(
SUMX(VALUES(Query1[Site]), [Site Target GP] * [Current Revenue]),
SUMX(VALUES(Query1[Site]), [Current Revenue])))
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!
Thank You
Dharmendar S
Doing this though got me the answer i needed so giving you credit as it led me to it
SiteTargetGP_TotalCalc =
IF(
HASONEFILTER(Query1[Site]),[Site Target GP %], -- Use the individual site value
DIVIDE(
SUMX(VALUES(Query1[Site]), [Site Target GP]),
SUMX(VALUES(Query1[Site]), [Current Revenue])))
Hello @mikekolba1
To calculate the overall total (denoted as "X" in your example), you need to do a weighted average calculation using Current Revenue as the weight.
Instead of directly summing up the percentages, you can use this formula to calculate the total Site Target GP % based on the weighted average
SiteTargetGP_TotalCalc =
IF(
HASONEFILTER(Query1[Site]),[Site Target GP %], -- Use the individual site value
DIVIDE(
SUMX(VALUES(Query1[Site]), [Site Target GP] * [Current Revenue]),
SUMX(VALUES(Query1[Site]), [Current Revenue])))
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!
Thank You
Dharmendar S
Doing this though got me the answer i needed so giving you credit as it led me to it
SiteTargetGP_TotalCalc =
IF(
HASONEFILTER(Query1[Site]),[Site Target GP %], -- Use the individual site value
DIVIDE(
SUMX(VALUES(Query1[Site]), [Site Target GP]),
SUMX(VALUES(Query1[Site]), [Current Revenue])))
Thanks Dharmendra- In this case , not quite. the individual site % are correct but the overall "total" % calculation is incorrect and actually way higher-
so for example
My site target GP total calc number is like 400,000
My Current Revenue total number is like 2,600,000
it should calculate about 15% as an example. using what you provided it calculated around 95,000 %
some example data to illustrate
| site | Current Revenue | Site Target GP | Site Target GP TotalCalc | Site Target GP% | Site Target GP% TotalCalc |
| a | 50 | 5 | 5 | 10 | 10 |
| b | 55 | 8 | 8 | 11 | 11 |
| c | 50 | 7 | 7 | 9 | 9 |
| d | 30 | 4 | 4 | 5 | 5 |
| Total | 185 | 24 | 6 | 35 | X |
Trying to get the (X) calculated value from the 185/6 (30.333) using the measure information above
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 |
|---|---|
| 34 | |
| 32 | |
| 20 | |
| 12 | |
| 11 |