6 Replies Latest reply: Dec 6, 2017 11:38 AM by Shahbaz Khan Mohammed

hi all ( stalwar1 ):

I was thinking about sthing like this (The syntax is for sure wrong);

sum({<Quarter={"=max(Month)=Month(Today()) "}>} Measure)

Now the question is, is my logic correct ; if so please help me correct the syntax.

and is there another way, simpler than this?

Thanks !

Max(Month) will always be (most likely) end of the quarter.... for example, let's assume we were in November... Max(Month) = 12 and Month(Today()) = 11.... Not sure if this can happen, but if it does, then it might not work....

Do u have a proposition on how to do?

I mean sthing like ?

sum({<Quarter={"=(Month)=Month(Today()) "}>} Measure)

with the right syntax?

Not entirely sure why you are taking this route, but may be this

Sum({<Quarter = p({<Month = {"\$(=Month(Today())"}>} Quarter)>} Measure)

I don't know if the Quarter Flag would work for you?

In script you can use

if(InQuarterToDate(YOURDATEFIELD, today(),0), 1, 0) as CurQtrFlag,

This will always give you current quarter