I'd like some help on the best way to determine the days between dates in different rows, using multiple criteria. The data can have duplicates in several columns, (Names/Zip and/or Acct No) but I have already solved for that in the Max Dup column. I have already calculated rank and the start date for each instance (not sure if I need this). I have a date table and realize I will need to use Datebetween in place of Networkdays.
Rank = =if([Max_Dup]="Dup_Name_Zip",RANKX(filter(ALL(Citris),[A_CustName]=EARLIER([A_CustName])),[ClosedDate],,1),if([Max_Dup]="Dup_AcctNo",RANKX(filter(ALL(Citris),[A_AcctNo]=EARLIER([A_AcctNo])),[ClosedDate],,1),1))
I like to determine; by either calculated column or measure the Days column -
A_ID A_CaseNo A_AcctNo A_CustName A_Zip Max_Dup ClosedDate Dup_Start_Month Rank Days
1778264 CA1402174 1234567890 Customer A 92805 Dup_Name_Zip 2/5/2014 0:00 2-Feb-14 1
1780331 CA1402537 1234567890 Customer A 92805 Dup_Name_Zip 3/3/2014 0:00 2 19
1789911 CA1404283 5555555555 Customer A 92805 Dup_Name_Zip 3/7/2014 0:00 3 5
1893359 CA1421247 1234567890 Customer A 92805 Dup_Name_Zip 10/23/2014 0:00 4 165
1816838 TX1407914 2345678910 Customer B 75240 Dup_Name_Zip 5/16/2014 0:00 5-May-14 1
1819378 TX1408289 Customer B 75240 Dup_Name_Zip 6/2/2014 0:00 2 12
1828786 TX1409758 2345678910 Customer B 75240 Dup_Name_Zip 6/13/2014 0:00 3 10
1828321 TX1409674 2345678910 Customer B 75240 Dup_Name_Zip 6/17/2014 0:00 4 3
1802583 MO1401660 3456789122 Customer C 63107 Dup_Name_Zip 4/3/2014 0:00 4-Apr-14 1
1803789 MO1401713 Customer C 63107 Dup_Name_Zip 4/25/2014 0:00 2 17
1817262 MO1402344 3456789122 Customer C 63107 Dup_Name_Zip 5/12/2014 0:00 3 12
1939532 MO1500599 3456789122 Customer C 63107 Dup_Name_Zip 2/12/2015 0:00 4 199
1900495 OK1402971 9876543210 Customer D 73072 Dup_AcctNo 11/4/2014 0:00 11-Nov-14 1
1904162 OK1403045 9876543210 Customer D 73072 Dup_AcctNo 11/12/2014 0:00 2 7
1907334 OK1403122 9876543210 Customer D 73072 Dup_AcctNo 11/14/2014 0:00 3 3
1920000 OK1403336 9876543210 Customer D 73072 Dup_AcctNo 12/19/2014 0:00 4 26
1920976 OK1403367 9876543210 Customer D 73072 Dup_AcctNo 12/22/2014 0:00 5 2
1782225 TX1402609 8765432100 Customer EE 77036 Dup_AcctNo 2/17/2014 0:00 2-Feb-14 1
1793899 TX1404321 8765432100 Customer EF 77036 Dup_AcctNo 3/18/2014 0:00 2 22
1797731 TX1404936 8765432100 Customer E 77036 Dup_AcctNo 4/1/2014 0:00 3 11
1810775 TX1406918 8765432100 Customer E 77036 Dup_AcctNo 5/1/2014 0:00 4 23
1817391 TX1407988 8765432100 Customer E 77036 Dup_AcctNo 5/8/2014 0:00 5 6
Rank = =if([Max_Dup]="Dup_Name_Zip",RANKX(filter(ALL(Citris),[A_CustName]=EARLIER([A_CustName])),[ClosedDate],,1),if([Max_Dup]="Dup_AcctNo",RANKX(filter(ALL(Citris),[A_AcctNo]=EARLIER([A_AcctNo])),[ClosedDate],,1),1))
I like to determine; by either calculated column or measure the Days column -
A_ID A_CaseNo A_AcctNo A_CustName A_Zip Max_Dup ClosedDate Dup_Start_Month Rank Days
1778264 CA1402174 1234567890 Customer A 92805 Dup_Name_Zip 2/5/2014 0:00 2-Feb-14 1
1780331 CA1402537 1234567890 Customer A 92805 Dup_Name_Zip 3/3/2014 0:00 2 19
1789911 CA1404283 5555555555 Customer A 92805 Dup_Name_Zip 3/7/2014 0:00 3 5
1893359 CA1421247 1234567890 Customer A 92805 Dup_Name_Zip 10/23/2014 0:00 4 165
1816838 TX1407914 2345678910 Customer B 75240 Dup_Name_Zip 5/16/2014 0:00 5-May-14 1
1819378 TX1408289 Customer B 75240 Dup_Name_Zip 6/2/2014 0:00 2 12
1828786 TX1409758 2345678910 Customer B 75240 Dup_Name_Zip 6/13/2014 0:00 3 10
1828321 TX1409674 2345678910 Customer B 75240 Dup_Name_Zip 6/17/2014 0:00 4 3
1802583 MO1401660 3456789122 Customer C 63107 Dup_Name_Zip 4/3/2014 0:00 4-Apr-14 1
1803789 MO1401713 Customer C 63107 Dup_Name_Zip 4/25/2014 0:00 2 17
1817262 MO1402344 3456789122 Customer C 63107 Dup_Name_Zip 5/12/2014 0:00 3 12
1939532 MO1500599 3456789122 Customer C 63107 Dup_Name_Zip 2/12/2015 0:00 4 199
1900495 OK1402971 9876543210 Customer D 73072 Dup_AcctNo 11/4/2014 0:00 11-Nov-14 1
1904162 OK1403045 9876543210 Customer D 73072 Dup_AcctNo 11/12/2014 0:00 2 7
1907334 OK1403122 9876543210 Customer D 73072 Dup_AcctNo 11/14/2014 0:00 3 3
1920000 OK1403336 9876543210 Customer D 73072 Dup_AcctNo 12/19/2014 0:00 4 26
1920976 OK1403367 9876543210 Customer D 73072 Dup_AcctNo 12/22/2014 0:00 5 2
1782225 TX1402609 8765432100 Customer EE 77036 Dup_AcctNo 2/17/2014 0:00 2-Feb-14 1
1793899 TX1404321 8765432100 Customer EF 77036 Dup_AcctNo 3/18/2014 0:00 2 22
1797731 TX1404936 8765432100 Customer E 77036 Dup_AcctNo 4/1/2014 0:00 3 11
1810775 TX1406918 8765432100 Customer E 77036 Dup_AcctNo 5/1/2014 0:00 4 23
1817391 TX1407988 8765432100 Customer E 77036 Dup_AcctNo 5/8/2014 0:00 5 6