0
votes

Can anyone suggest how to select a value in one column (CustomersCount) of Excel based on the last day of the each month in another column using DAX formula? See table below.

The end result should be:

CustomersCount  DATE_COUNTED   LASTDAY
355998          4/30/2015      4/30/2015

and so on for each following month

Table

CustomersCount  DATE_COUNTED    LASTDAY
358919  4/14/2015   4/30/2015
358643  4/15/2015   4/30/2015
358512  4/16/2015   4/30/2015
358240  4/17/2015   4/30/2015
358050  4/18/2015   4/30/2015
357887  4/19/2015   4/30/2015
357761  4/20/2015   4/30/2015
357506  4/21/2015   4/30/2015
357284  4/22/2015   4/30/2015
357075  4/23/2015   4/30/2015
356912  4/24/2015   4/30/2015
356764  4/25/2015   4/30/2015
356626  4/26/2015   4/30/2015
356471  4/27/2015   4/30/2015
356326  4/28/2015   4/30/2015
356172  4/29/2015   4/30/2015
355998  4/30/2015   4/30/2015
1

1 Answers

0
votes

If you really just want to find CustomerCount entries where DATE_COUNTED is equal to LASTDAY, then:

[Last Day Customer]:=if(MAX(Table1[DATE_COUNTED])=MAX(Table1[LASTDAY]),SUM(Table1[CustomersCount]),BLANK())

enter image description here