Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ebrahimaljafri
Partner - Contributor II
Partner - Contributor II

ignore selections in if Statement

hi qlikers 

i am using pie chart to present a bucket range of time and i have applied each range a color within color and legend using color by expression . 

if i am using set analysis i would use 1 within set analysis and will ignore all selections but i am using if statement and can not use 1 in it.

please help. 

2 Solutions

Accepted Solutions
jerryyang756
Creator
Creator

Try this...exclude selections in SELECTION1=,SELECTION2=

if( Only({< SELECTION1=,SELECTION2= >} BUKET_MON'I‘HLYTIMETABLE)='less Than 7' , '#66b699',
if( Only({< SELECTION1=,SELECTION2= >} BUKET_MON'I‘HLYTIMETABLE)='7-10','#ffff4d',
if( Only({< SELECTION1=,SELECTION2= >} BUKET_MON'I‘HLYTIMETABLE)='More Than 10', '#ff4d4d'
)))

or with {1} to exclude all selections

if( Only({1} BUKET_MON'I‘HLYTIMETABLE)='less Than 7' , '#66b699',
if( Only({1} BUKET_MON'I‘HLYTIMETABLE)='7-10','#ffff4d',
if( Only({1} BUKET_MON'I‘HLYTIMETABLE)='More Than 10', '#ff4d4d'
)))

View solution in original post

Vegar
MVP
MVP

Use
ONLY({1} BUKET_MONTHLYTIMETABLE ) = instead of
BUKET_MONTHLYTIMETABLE =

View solution in original post

2 Replies
jerryyang756
Creator
Creator

Try this...exclude selections in SELECTION1=,SELECTION2=

if( Only({< SELECTION1=,SELECTION2= >} BUKET_MON'I‘HLYTIMETABLE)='less Than 7' , '#66b699',
if( Only({< SELECTION1=,SELECTION2= >} BUKET_MON'I‘HLYTIMETABLE)='7-10','#ffff4d',
if( Only({< SELECTION1=,SELECTION2= >} BUKET_MON'I‘HLYTIMETABLE)='More Than 10', '#ff4d4d'
)))

or with {1} to exclude all selections

if( Only({1} BUKET_MON'I‘HLYTIMETABLE)='less Than 7' , '#66b699',
if( Only({1} BUKET_MON'I‘HLYTIMETABLE)='7-10','#ffff4d',
if( Only({1} BUKET_MON'I‘HLYTIMETABLE)='More Than 10', '#ff4d4d'
)))

Vegar
MVP
MVP

Use
ONLY({1} BUKET_MONTHLYTIMETABLE ) = instead of
BUKET_MONTHLYTIMETABLE =