Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
pyt30
Contributor
Contributor

Creating tick box

Hi I am trying to create a tick box for my graphs within QV so I can select sites for example Bridgwater, Wiveliscombe etc.

My graph is currently displayed as a Line Chart with calculation condition

//count(distinct [Site Id])=1

And the chart expression

=if(count({$ <[Calendar WeekStart]=,Logger_Transaction_Date={'>=$(=addmonths(max(Logger_Transaction_Date),-12)) <=$(=max(Logger_Transaction_Date))'}>} distinct Logger_Origin_Site_Id)=1, 'Trend For ' & only({$ <[Calendar WeekStart]=,Logger_Transaction_Date={'>=$(=addmonths(max(Logger_Transaction_Date),-12)) <=$(=max(Logger_Transaction_Date))'}>} Logger_Origin_SiteName), 'West Thickeners')

And under the 'expressions' tab, I used the conditional statement:

if(SubStringCount(GetFieldSelections(_metrics1), 'Bridgwater')>0, 1, 0)

And in the script, I added

Metrics1:
Load * Inline [_metrics1, Flag1
Bridgwater, 1
Wiveliscombe, 1
etc
]
;

But it does not seem to be working

1 Reply
bharathadde
Creator II
Creator II

Use this in condition, don't use any if statement

=SubStringCount(Concat(GetFieldSelections(_metrics1), '|'), 'Bridgwater')>0