Forum Discussion
Identify latest date from another table
Hello! I created the below measure and it works as expected:
Counted =IF(MAX('YourTable'[LastCountedOn]) = TODAY(),"Yes","No")Here is the sample data I used:Here is the output:
- Anonymous1 year ago
Hi Oros ,
Try the following dax expression. The reason it differs from the expected result you show is because today is the 18th of October.
NOT COUNTED = VAR _max_date = CALCULATE ( MAX ( 'COUNT TABLE'[LAST COUNTED ON] ), FILTER ( 'COUNT TABLE', 'COUNT TABLE'[PRODUCT] = 'INVENTORY TABLE'[Product] ) ) RETURN IF ( FORMAT ( _max_date, "yyyy-mm-dd" ) = FORMAT ( TODAY (), "yyyy-mm-dd" ), "Yes", "No" )If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- audreygerredSuper User
Hello! I created the below measure and it works as expected:
Counted =IF(MAX('YourTable'[LastCountedOn]) = TODAY(),"Yes","No")Here is the sample data I used:Here is the output:
- OrosPost Prodigy
- AnonymousNot applicable
Hi Oros ,
Try the following dax expression. The reason it differs from the expected result you show is because today is the 18th of October.
NOT COUNTED = VAR _max_date = CALCULATE ( MAX ( 'COUNT TABLE'[LAST COUNTED ON] ), FILTER ( 'COUNT TABLE', 'COUNT TABLE'[PRODUCT] = 'INVENTORY TABLE'[Product] ) ) RETURN IF ( FORMAT ( _max_date, "yyyy-mm-dd" ) = FORMAT ( TODAY (), "yyyy-mm-dd" ), "Yes", "No" )If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- OrosPost Prodigy
Hi Anonymous,
It works! Thanks.