Finding the Total of a Calculated Field

bigbadbrad

New Member
Joined
Apr 19, 2012
Messages
4
I am trying to use the Total of a calculated field column i created as the denominator in another calculated field. So i have a calculated field that is calculating the unique sum:

"[UniqueDemand] =SUMX(DISTINCT(KWfile[Keyword]), [MaxDemand])".

This formula works great for what i am doing. But what i would like to do now is take the total of [UniqueDemand] and use it in the denominator of another equation to get the % of total from a different field.
I don't seem to be able to just use a simple

"SUM([UniqueDemand])", i guess because it is a calculated field I get a formula error? And when i try to do something like:

"SUMX(ALL(KWfile), [UniqueDemand])" i get the wrong result,

for some reason i get a total but the total i get now has duplication i removed in the [UniqueDemand] equation?
I'm stumped, seems like i am so close i just can't seem to calculate the total of [UniqueDemand] so i can use it in another equation. Anyone have any ideas?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Alright, figured it out:

Calculate(KWfile[UniqueDemand],All(KWfile))

This formula will give me the correct total of my calculated [UniqueDemand] field. Not entirely sure why Calculate() works and the SUMX() formula does not (guessing just the iterative processing of the SUMX was not doing what i thought in that case). Still figuring out DAX but slowly getting what i need...
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,822
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top