Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Help

Hi All,

I have an issue with Expression

Calls Expression  =sum({<[Date Identifier] = {'>=$(vPreviousWeekStart)<=$(vPreviousWeekEnd),[Call Status ID] ={5},[Relat Type Identifier]={1}'}>}[Call Count])

PCalls Expression =sum({<[Date Identifier] = {'>=$(vPreviousWeekStart)<=$(vPreviousWeekEnd),[Call Status ID] ={5},[Relat Type Identifier]={2}'}>}[Call Count])

i have there two expression in Barchart

and  same i have one list box which is having values 1 and 2

list box name Relat Type Identifier=1,2

Issue is

if i click one value(1)or(2) in list box barchart will appier only 1 or 2 values

but im getting both Bars in chart

some one help me

Thanks in advance

niru

6 Replies
tresesco
MVP
MVP

Try this:

sum({<[Date Identifier] = {'>=$(vPreviousWeekStart)<=$(vPreviousWeekEnd),[Call Status ID] ={5},[Relat Type Identifier]={1} '}>}[Call Count])

PCalls Expression =sum({<[Date Identifier] = {'>=$(vPreviousWeekStart)<=$(vPreviousWeekEnd),[Call Status ID] ={5},[Relat Type Identifier]={1} '}>}[Call Count])

NavinReddy
Creator II
Creator II
Author

but i need to be use these filter in Expression

=sum({<[Date Identifier] = {'>=$(vPreviousWeekStart)<=$(vPreviousWeekEnd),[Call Status ID] ={5},[Relat Type Identifier]={1}'}>}[Call Count])

=sum({<[Date Identifier] = {'>=$(vPreviousWeekStart)<=$(vPreviousWeekEnd),[Call Status ID] ={5},[Relat Type Identifier]={2}'}>}[Call Count])

tresesco
MVP
MVP

I guess you want one expression to be active at a time. If so, try expression enablement conditional. Go to expression tab, select first expression, select conditional (unser Show sub menu). Expression =[Relat Type Identifier]=1

Similarly for second expression = [Relat Type Identifier]=2

NavinReddy
Creator II
Creator II
Author

if i give condition enable  when i will open QVW chart will show empty

atleast one should be select one list box ,

chat will show both

when i  select listbox value it filter

tresesco
MVP
MVP

For first expression put:

=[Relat Type Identifier]<>2

somenathroy
Creator III
Creator III

Hi,

Define a variable as :

vSelectedRTI = if(IsNull(getfieldselections([Relat Type Identifier])),1,getfieldselections([Relat Type Identifier]))

Then use below expression:

sum({<[Date Identifier] = {'>=$(vPreviousWeekStart)<=$(vPreviousWeekEnd)'},[Call Status ID] ={5},[Relat Type Identifier]={'$(vSelectedRTI)'}>}[Call Count])

Regards,

Som