Note: Unlike other queries I have share here at TheSQLReport, I am the author of this one. Sharing because I could not find it in my Google Searches. Tested this back to version SQL Server 2012. Also please remember that physical_memory_in_use_kb may be a constantly changing number depending on how SQL Server is configured & the activity of the operating system.
Click through for the query and an example of it in action.