Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want select current quarter
Quarter={$(=max(Quarter))} is this right way ?
How is the quarter created in the script?
'Q' & Ceil(Month(TempDate)/3) as Quarter
If it is like this, you can try this:
{<Quarter = {"$(=MaxString(Quarter))"}>}
Also if you want max Quarter from the most recent year, then may be this:
{<Quarter = {"$(=MaxString({<Year = {$(Max(Year))}>}Quarter))"}>}
Thank you for instant reply
I wanted to create YTD,QTD,MTD,WTD .My code is
=if(DateTemp='YTD',sum({<type={'Order'},Year={$(=Max(Year))},Quarter=,Month=,Week=,OrderDate={"<=$(=Date(Max(OrderDate),'DD/MM/YYYY'))"}>}Sales),
if(DateTemp='QTD',sum({<type={'Order'},Year={$(=Max(Year))},Quarter={$(=max(Quarter))},Month=,OrderDate={"<=$(=Date(Max(OrderDate),'DD/MM/YYYY'))"},Week=>}Sales),
if(DateTemp='MTD',sum({<type={'Order'},Year={$(=Max(Year))},Quarter={$(=max(Quarter))},Month={$(=max(Month))},OrderDate={"<=$(=Date(Max(OrderDate),'DD/MM/YYYY'))"},Week=>}Sales),
if(DateTemp='WTD',sum({<type={'Order'},Year={$(=Max(Year))},Quarter={$(=max(Quarter))},Month={$(=max(Month))},Week={$(=max(Week))},OrderDate={"<=$(=Date(Max(OrderDate),'DD/MM/YYYY'))"}>}Sales),
sum({<type={'Order'},Year={$(=Max(Year))},Quarter=,Month=,Week=,OrderDate={"<=$(=Date(Max(OrderDate),'DD/MM/YYYY'))"}>}Sales)))))
But it didn't work
Can you please help with this ?
I did respond to your other post also. Can you check if that is working?