# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Esteemed Contributor

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 !

6 Replies
MVP

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....

Esteemed Contributor

Do u have a proposition on how to do?

I mean sthing like ?

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

with the right syntax?

Honored Contributor II

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

MVP

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

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

Esteemed Contributor