Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
StacyCui
Creator
Creator

Dynamic Labels

I have an order table which includes three dimensions: industry, region, and product. In the Data Load Editor, I group the orders by these three dimensions and write a IF statements for customer OR conditions, which serve as labels. In the Qlik Sense front table, if I filter a single dimension, such as industry, can the labels change accordingly based on the selected industry orders? 

If the three dimensions are set as variables and aggregated in the script, can the labels change accordingly with the front table filters?

Labels (3)
3 Replies
MayilVahanan

Hi

Based on my understanding, if you are creating the combination of three field values, and based on any single field, you want to display the corresponding combination values? 
if so, you can use Minstring() or Maxstring() function. Because, might be, one industry can have different products. In that case, Minstring / Maxstring can display any one combination values. 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ajaykakkar93
Specialist III
Specialist III

Yes, In general you can create a variable that will have that logic & can just call the variable in to the column title 

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

StacyCui
Creator
Creator
Author

Hi,  Here is my formula, how can I write Minstring / Maxstring? It seems like the following formula is not working properly. 


SET vVariable1 = 'Industry';
SET vVariable2 = 'BU';


LIB CONNECT TO 'CH1_DI_SE';
PY_1:
LOAD $(vVariable1),
$(vVariable2),
"ECODE",
sum("ORVALUE") as "ORVALUE"
group by
"ECODE",
$(vVariable1),
$(vVariable2);
SQL SELECT
"FROZENDATE",
"AKZ",
"BU",
"BUSEGMENT",
"GCK",

Industry,
"ORVALUE",
"ORDERSOURCE",
"CONTROLLINGAREA",
"SELLINGPARTY",
"ORTYPE",
"CONTRACTNO",
"COMPANYNAMECN",
"COMPANYNAMEEN",
"COMPANYCNOC",
"COMPANYSAPNO",
"IFA",
"BUYERCN",
"BUYEREN",
"BUYERCNOC",
"BUYERSAPNO",
"VBEZ",
"SALESNAME",
"USERGID",
"EMAIL",
"SALESTYPE1",
"SALESTYPE2",
"SALESTERRITORY",
"SALESBRANCH",
"SALESOFFICE",
"SALESDEPARTMENT",
"SALESDISTRICT",
"SPOREFNO",
"SPRNO",
"ASSIGNVALID",
"ECODE",
"TOVALUE",
"OOHVALUE",
"VBEZFOCUSBRANCH",
"ASSIGNTYPE",
"ASSIGNSOURCECNOC"
FROM "CV_OI_SOLISTDETAILPY";

 

NoConcatenate

 


PY_2:
LOAD *,
if("ORVALUE">=0,'Y','N') as Label

resident PY_1;