Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I log invoice data every day, and would like to count the number of invoices that were issued before yesterday for orders that were confirmed for yesterday. I.e. the number of orders that were due yesterday and were shipped before yesterday.
I have searched the forum and found something like this:
Solved! Go to Solution.
@Cadenze , Try like
Shipped early =
countrows(filter('DeliveryDetails', 'DeliveryDetails'[InvoiceDate] = Today()-1 && 'DeliveryDetails'[FirstConfirmedDlvDate]<today()-1 ) )
@amitchandak . Of course, when I check my data today, that field is empty because yesterday was Sunday and the day before that was Saturday. both of which have no activity. Is it possible to modify the sentence so it only uses workdays Mon-Fri?
@Cadenze , Try like
Shipped early =
countrows(filter('DeliveryDetails', 'DeliveryDetails'[InvoiceDate] = Today()-1 && 'DeliveryDetails'[FirstConfirmedDlvDate]<today()-1 ) )
This is the closest I have come to a working measure, so thank you for that. And once I put my head back on, I found that I needed to switch InvoiceDate and FirstConfirmedDlvDate in you excellent query :-).
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |