Forum Discussion
Samcooke
2 years agoFrequent Visitor
Need Help with Filtering to Max Date
Hi all, I am struggling with something that I thought would be easy but apparently not for me. I have a table of orders that have the product and the ship date for easch product. Some of the orders h...
- 2 years ago
Thanks for your feedback. I ended up using the below query I found somewhere else and replaced the table and fields with mine. It worked. I had never used "Filter" in a query before
MaxOfMonth = IF( Table1[date] = CALCULATE( MAX(TableName[date]), FILTER( ALL(TableName), MONTH(TableName[date]) = MONTH(EARLIER(TableName[date])) && YEAR(TableName[date]) = YEAR(EARLIER(TableName[date])) ) ), TRUE, FALSE )
parry2k
2 years agoSuper User
Samcooke why not add a measure for maximum ship date and then use that in the visual instead of ship_created_Date
Max Ship Date = MAX ( Table[Ship_Created_Date] )Samcooke
2 years agoFrequent Visitor
Thanks for your feedback. I ended up using the below query I found somewhere else and replaced the table and fields with mine. It worked. I had never used "Filter" in a query before
MaxOfMonth = IF( Table1[date] = CALCULATE( MAX(TableName[date]), FILTER( ALL(TableName), MONTH(TableName[date]) = MONTH(EARLIER(TableName[date])) && YEAR(TableName[date]) = YEAR(EARLIER(TableName[date])) ) ), TRUE, FALSE )