Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |