Sum Distinct?

bigbadbrad

New Member
Joined
Apr 19, 2012
Messages
4
Just started using PowerPivots and DAX. Figured out the Count Distinct function real quick, it is great. The problem i have is i would also like to show a sum distinct of the same data set. Seems like it should be possible using SUMX or CALCULATE function filtering the table by the Distinct count i already have. Not that easy though, atleast not for me.

Data Example:
Category Keyword Demand
Cat1 KW1 100
Cat1 KW2 200
Cat1 KW3 300
Cat2 KW1 100
Cat2 KW4 400

I would like to be able to sum the data at the keyword level and show distinct sum of the Demand. Where KW1 is in multiple Categories, i would still like to be able to do a sum where the demand is only summed once (distinct).
Any ideas would be greatly appreciated. Thanks...
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Just struck me how to do this:
First create a new measure that takes the Max of my Demand (or min or average, doesn't matter since my demand number is always the same by keyword)
Then use a SUMX formula: SUMX(DISTINCT([Keyword]), [MaxDemand])
In this example, it gets me the correct number i am looking for...
 
Upvote 0

Forum statistics

Threads
1,224,115
Messages
6,176,466
Members
452,728
Latest member
mihael546

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