Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
germanboxers
Contributor III
Contributor III

Parse variable to use as a value in set analysis

I need to parse a variable that is set from the variable input extension and use the parsed string in two ways in a single expression.

Currently I have 9 sheets to convey backlog conditions for 9 units designated by letters.  If I can parse the variable in two spots in the expression, I can reduce 9 sheets to one sheet and add much more understanding.  The full expression looks like this now:
sum({$<csp_calendar.plan_facility_cd={'B'}>}csp_calendar.plan_tons * [yield.b])

The variable set from the variable input extension is Facility_Backlog.  The values for this variable take the form "b_backlog_type",  "p_backlog_type", or "c_backlog_type", etc.  I need to parse the first letter in the variable's value (i.e. blue letter) and insert it in the two places highlighted by red in the original expression above:

  1. The first place to use it is in the set analysis in the expression.  I have tried variations on the following bolded part, but what I've tried didn't work.
    sum({$<csp_calendar.plan_facility_cd={'$(Capitalize(Left(Facility_Backlog,1)))'}>}csp_calendar.plan_tons * [yield.b])
  2. The second place I need to use it is in the measure portion of the expression.  I need to concatenate "yield." with the first letter of the value of the variable.  I tested the bolded below, that that didn't work either.
    =sum({$<csp_calendar.plan_facility_cd={'B'}>}csp_calendar.plan_tons * (="$('yield.' & Left(Facility_Backlog,1))"))

 

Any help would be greatly appreciated.

Thanks,

Jordan

Labels (1)
1 Reply
Brett_Bleess
Former Employee
Former Employee

In these types of posts, it will be more helpful if you attach a sample QVW file such that Members can see your data model and all expressions etc., this is the best way to ensure you receive responses, as it is difficult for folks to sort things out most of the time without that additional information available to review.

The best place I could point you to otherwise is the Design Blog area to see if you can find some posts there that will help you get things sorted:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.