Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

siddharthsoam
Contributor

Compare two variables using if in qliksense

Hi,

I want to compare 2 variables using if condition in the measure section of a pivot.

Variables are-

    

S.NoVariable nameExpression
1$(prev_month)Date( MonthEnd(addmonths(Max(Date#(reportdate,'DD-MMM-YYYY')),-1)),'DD-MMM-YYYY')
2$(v_q_end)if(GetSelectedCount(reportdate)=0,

date(date#(
  QuarterEnd( AddMonths( date(date#($(max_recent_date),'DD-MMM-YYYY'),'DD-MMM-YYYY'),-3)),'M/DD/YYYY'),'DD-MMM-YYYY'),


date(date#(
  QuarterEnd( AddMonths( date(date#(GetFieldSelections(reportdate),'DD-MMM-YYYY'),'DD-MMM-YYYY'),-3)),'M/DD/YYYY'),'DD-MMM-YYYY')
)

I am trying to use the following expression-

if($(prev_month)=$(v_q_end),

count(EMPLID))

But to no avail.. want help please

Community Browser