DistinctCount, Averaging trouble

mfarr76

New Member
Joined
Jan 3, 2014
Messages
36
Hello,
I am attempting to use the DistinctCount expression to determine the number of properties (Serial Numbers in the attached spreadsheet) that are contributing to an aggregated column. The properties all start on day 1 but turn off at different times, therefore leaving the aggregated column jagged or stair-step like when they turn off (see attached workbook for an example).

I ultimately want to truncate the aggregated column when the when the contributing properties are less than the max, eliminating the late time data. I am using the following formula but it isn’t filter correctly (I think) because I get the same value for all the days even when properties are not contributing.

Any help would be greatly appreciated!

=
CALCULATE (
DISTINCTCOUNT ( Table1[SERIAL_NUM] ),
FILTER (
Table1,
Table1[SUB_GROUP] = EARLIER ( Table1[SUB_GROUP] )
&& Table1[DAYS] <= EARLIER ( Table1[DAYS] )
)
)


https://www.dropbox.com/sh/c6c791qaa506535/AADwr1Lzfixfp957ngZSt0o1a?dl=0

Thanks,
Michael
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi Michael, your dropbox link seems to be pointing to an empty folder. Could you post a corrected link?
 
Upvote 0
Hi Michael, your dropbox link seems to be pointing to an empty folder. Could you post a corrected link?

My apologizes, I forgot to move the file into the folder. It has been corrected, please use the link above.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,592
Members
449,089
Latest member
Motoracer88

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