Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

danielco223
New Contributor III

Need If with And

Hi i have a need to create a table that show current year sales data broken up by quarters. The measures are rolling measures that need to calculate on one of two variables depending on whether the measure is in the current quarter or not. for example, if we are in Q2 then the measure would calculate the variable $(Sales + Adjustments Quarter to Date) while the Q1 measure would look at $(Sales + Adjustments Q1). To do this, I need the measures to consider the current year and quarter to calculate. I have a variable for the current year, and the fiscal quarter number will always be Q1-4 so I built that in as an if statement. However, this measure is not calculating.

Any advice?

=if([Fiscal - Year]=$(vCurrentYear) and vCurrentFiscalQuarterName={'Q1'},

$(PTQ Sales + Adjustments Quarter to Date),

$(PTQ Sales + Adjustments Q1))


Thanks!

1 Reply

Re: Need If with And

Not sure, I followed you? Can you describe the conclusion ?

Life is so rich, and we need to respect to the life !!!
Community Browser