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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
NotSoClever
Frequent Visitor

Calculating Row Value against Total of the same Column

Hello, 

I've been trying to generate the following formula to get an impact from a giving set of values (To Achieve field). Tried different DAX functions and not quite close to get the sum of all rows from the same column. 

basically, the formula is as follow:

=((TotalBase - RowBase + (RowSample * Goal)) / TotalSample) - Average

i.e first row= ((16611.91 - 200 + (2 * 85)) / 199) - 83.4769

 

I would like to display the measure result on a table after placing the first three columns.

 

Samples are individual rows with their original score/result.

 

 83.476919916611.9185 
NameAverageSampleBASEGOALTo achieve
A100.0220085-15.08%
B100.0220085-15.08%
C100.0220085-15.08%
D100.0220085-15.08%
E98.2333241.9285-219.56%
F97.9141370.0485-90.47%
G97.7151465.0585-95.50%
H93.1181675.9885-73.36%
I92.9181672.0285-71.37%
J85.77599.9785-2.50%
K85.17595.9885-0.49%
L84.9171443.98850.51%
M75.3231730.9885112.57%
N75.29676.988544.23%
O75.043008520.10%
P44.01448520.60%
Q44.01448520.60%
R41.4520785109.55%
S41.01457485309.55%
T34.73104.018575.87%
U33.02668552.26%

 

Appreciated any guidance you can provide. 😃

3 REPLIES 3
lbendlin
Super User
Super User

You may want to validate your expected result. It doesn't match your formula.

 

lbendlin_0-1707010442609.png

Note that "Goal"  and "Average"  are reserved words.

Hi Ibendlin,

Thank you very much for your time. This is somehow a similar approach i tried, but unfortunately it is not showing a correct/desired result. I think I had to specify how the table is structured. 

Basically the above is dummie data. Lets say instead of a summarized table, my original Table data contains 199 rows (samples) each one with their individual Average/result [just three columns (Name/Average/Sample)]. My Overall average (Average to use in the calculation) would be the average of my Average column, and thats the result I need to consider.

A bit of what I'm trying to do: its kind of a Cross-Multiplication (considering the individual average against the Overall Average) which will tell me if a NAME reaches GOAL how much will my Overall Average (AVERAGE) will increase (at least for those below goal). I.e. the last row U, if somehow this item achieve 85 goal, my Overall will increase by 0.52 (now 84).

On the above approach its showing -15 where actually it would be 1.53 (which is the difference from Goal).

NotSoClever_0-1707109288304.png


Again, I really really appreciate your time on helping out. Would you have another idea/approach on how this can be solved?

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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