Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a list of sales records which are identified via their BatchCode and have created an expression to display them on a BarChart as follows:
=Sum({<BatchCode={"ABC-001","ABG-002","AFG-005","XYZ-135","LMN-142".. }>}Revenue
I have a List Box object that I use to list specific BatchCodes which I would like to analyze. The expression is as follows:
=Aggr(
if(BatchCode='ABC-001'
or BatchCode='ABG-002'
or BatchCode='AFG-005'
or BatchCode='XYZ-135'
or BatchCode='LMN-142'
...
,BatchCode),BatchCode)
Currently, all my BatchCodes in the above set will always be shown, regardless of which BatchCodes I select.
I would like to display only BatchCode(s) from this subset which I select, instead of displaying the entire list of BatchCodes.
How should I change my expression to enable this?
Thanks in advance!
Hi,
got it solved? if not, you can try this..
Create one variable and assign the concat value of your Batch code. Like
Variable : v1
Definition : =Concat(DISTINCT chr(34)&BatchCode&chr(34),',')
Expression : sum({<BatchCode={$(v1)}>}Revenue)
Hi,
You can create same field in Script
like
if(wildmatch(BatchCode,'ABC-001','ABG-002','AFG-005'),BatchCode) as New_BatchCode
Use above field in Front End list box
Aggr(New_BatchCode,New_BatchCode)
For Expression you can write
Sum({<BatchCode={"$(=p(New_BatchCode))"}>}Revenue)
Regards