Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a field containing the names of two other numeric fields

I read a nice post created by Henric november last year. Mentioning:

"

  • Create a field [Field to Aggregate] containing the names of two other numeric fields: 'Quantity' and 'Sales'
  • Create a variable vConditionalAggregationField = '=Only([Field to Aggregate])'
  • Create a chart with an expression = Sum($(vConditionalAggregationField)

"

I am stuck with actually creating the field containing the names of two other numeric fields. Thanks in advance.

1 Solution

Accepted Solutions
Not applicable
Author

see this if can help you......

View solution in original post

5 Replies
fkeuroglian
Partner - Master
Partner - Master

Hi, create a field in the script? or in the object

Script:

Field1 & Field2 as Field1Field2;

in the objecto you have to create at as dimension

Good Luck

Fernando

Not applicable
Author

You can try this

/////////    =SUM(Quantity)&'-'&SUM(Sales)      /////////////////////////////// (layout) or

/////////  (Quantity)&'-'&(Sales) as concat_values   /////////// script

/////////// SUM(Quantity)&'-'&SUM(Sales) as concat_wt_gb //////////// script ( creating a group by clause)

swuehl
MVP
MVP

Data:

LOAD * INLINE [

Quantity, Sales

1, 20

2, 30

1, 15

];

SelectMeasure:    

LOAD * INLINE [

FieldToAggregate

Quantity

Sales

];

Then, in front end:

  • Create a variable vConditionalAggregationField = '=Only([FieldToAggregate])'
  • Create a chart with an expression = Sum($(vConditionalAggregationField)
  • Create a list box with field FieldToAggregate and select one value
Not applicable
Author

see this if can help you......

Not applicable
Author

Thanks for your time and effort solving my problem!