Forum

Notifications
Clear all

How to get count of the names by month related to Accommodation Entry and Departure Date

6 Posts
2 Users
0 Reactions
63 Views
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Hi Team,

I just want to make my COUNTIFS formula (COUNTIFS($B9,"<="&D$1,$C9," ")+COUNTIFS($B9,"<="&D$1,$C9,">= " & D$1) work for the following scenario.

If AccomEntryDate is earlier than D1(nominated EOM), and DepartureDate is "null", it will be 1.

If AccomEntryDate is earlier than D1(nominated EOM), and DepartureDate is after D1(nominated EOM) , it will also be 1.

if both conditions are not met, it will be 0

 

Please see attached working data and ExpectedResult for the reference.

If you can direct me to Power query, with the similar formula, that will be better.

Many thanks.

 

Regards,

Aye

 
Posted : 26/09/2020 3:44 am
(@questvba)
Posts: 125
Estimable Member
 

Hi Aye,

Here is a possibility with formula.

BR,

Lionel

 
Posted : 26/09/2020 4:08 am
(@questvba)
Posts: 125
Estimable Member
 

And with Power Query (For the first two months).

 
Posted : 26/09/2020 4:24 am
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Many thanks, Lionel,

It is indeed a great help.

Regards,

Aye

 
Posted : 26/09/2020 7:25 pm
(@ayemu7)
Posts: 197
Reputable Member
Topic starter
 

Hi Lionel,

I just have to add some more additional columns on my post.

I added ReceivedDate, Full/Partial and Amount columns for the same customerID(CustID). I now have change my formulae to ReceivedDate instead of EntryDate.

I cannot have duplicated records in my expected result.

In our formulae, we have to look if the clients are the same and received date are different, it will take the latest date at the specified month. Can you please guide me to fix the formula for both excel and power query.

Many thanks.

Regards,

Aye

 
Posted : 28/09/2020 12:31 am
(@questvba)
Posts: 125
Estimable Member
 

Hello Aye,
I' m joining you the file with a formula. Warning, it' s a matrix formula to be validated with CTRL SHIFT ENTER.

 
Posted : 29/09/2020 1:42 am
Share: