Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip

Found a cool tip you would like to share? Stick it in the comments below, I'll add it and credit you

Expand
title(more...)

Please leave your name and email (you can include your company name and job title too if you like) for the credit as once added, I shall delete your original comment 



Page Tree
rootCool Tips and Tricks

RequirementExplanation (Optional)Solution
Need to identify the first or last order date each month?

This elegant solution first truncates each day in each month back to MM/YYYY and then identifies the Max or Min date.

Functionally identical to a scoped Window_Max or an SQL Max(Order_Date) Over(Partition By DatePart...


Code Block
languagesql
{Fixed DateTrunc('month',[Order Date]) : Max([Order Date])}