Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis inside if statement

Does anyone know how to fix this problem? I cant seem to get the expression to work inside a if statement in a straight table with a dimension called label_churnSummary, but i place it in a textbox, it works fine.

Am i missing something? Thanks in advance.

if(label_churnSummary='Retention %',

  num(

  if(len(GetFieldSelections([FIN YEAR]))>1 or len(GetFieldSelections(MONTH_NAME))>1,

  (

  num(sum({<[FIN YEAR]=,MONTH_NAME=,label_churnSummary=,Measure_churnSummary={'Corrected'},MonthYear={'$(=MonthName(AddMonths(max(Date),-11)))'}>}value_churnSummary),'###0')

)

  ,

  sum({<[FIN YEAR]=,MONTH_NAME=,label_churnSummary=,Measure_churnSummary={'Corrected'},MonthYear={'$(=(MonthName(addmonths(today(),-11))))'}>}value_churnSummary)

  )

  ,'###0')

  ,

  num(

  if(len(GetFieldSelections([FIN YEAR]))>1 or len(GetFieldSelections(MONTH_NAME))>1,

  sum({<[FIN YEAR]=,MONTH_NAME=,MonthYear={'$(=MonthName(AddMonths(max(Date),-11)))'}>}value_churnSummary),

  sum({<[FIN YEAR]=,MONTH_NAME=,MonthYear={'$(=(MonthName(addmonths(today(),-11))))'}>}value_churnSummary)

  )

  ,format_Churn)

  ),

1 Reply
michael_maeuser
Partner Ambassador
Partner Ambassador

do you have a sample qvw?

its hard to guess whats going on without seeing anything.