Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all ( stalwar1 😞
how to return today's quarter?
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?
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
Not entirely sure why you are taking this route, but may be this
Sum({<Quarter = p({<Month = {"$(=Month(Today())"}>} Quarter)>} Measure)
Thanks ; I'm aware of such an alternative, but I was wondering if there is a possibility to do such a thing directly within the set expression
Year(Today())&'Q'&ceil(Month(Today())/3)
Store above in Variable and use the variable in your Set if you hvae correct format for year and quarter