Section Access: reduction fields need to be exactly matching
Article Number: 000051748 | Last Modified: 2018/11/21
Description
Look at this sample script: //////////////////////////////////////////////////////////////////////////// //Data table AREA_Data: LOAD RATING, Dual(AREA, SORT_ORDER) AS AREA; //Reduction field is constructed by DUAL() function LOAD * INLINE [ RATING, AREA, SORT_ORDER AREA1_RATING, AREA1, 1 AREA2_RATING, AREA2, 2 AREA3_RATING, AREA3, 3 AREA4_RATING, AREA4, 4 AREA5_RATING, AREA5, 5 AREA6_RATING, AREA6, 6 ];
//Section Access table //Reduction field "AREA" is plain text SECTION ACCESS; UserList: LOAD * INLINE [ USERID, PASSWORD, ACCESS, AREA USER1, USER1, USER, AREA1 USER2, USER2, USER, AREA2 USER3, USER3, USER, AREA3 USER4, USER4, USER, AREA4 USER5, USER5, USER, AREA5 USER6, USER6, USER, AREA6 USER7, USER7, USER, * ]; //////////////////////////////////////////////////////////////////////////// As a result, reduction does not happen.
Cause
Reduction fields between data table and section access table have to be exactly matching. Like the example above, "AREA" field in data table is constructed by DUAL() function, which makes the field has text and numeric values. On the other hand, "AREA" field in section access table is plain text(doesn't have numeric values). As a result, these two fields do not match and reduction does not happen, despite the same text values.
Resolution
Rewrite the data table to include a dedicated reduction field that is also plain text: //////////////////////////////////////////////////////////////////////////// AREA_Data: LOAD RATING, AREA As AREA_REDUCTION, Dual(AREA, SORT_ORDER) AS AREA; LOAD * INLINE [ RATING, AREA, SORT_ORDER AREA1_RATING, AREA1, 1 AREA2_RATING, AREA2, 2 AREA3_RATING, AREA3, 3 AREA4_RATING, AREA4, 4 AREA5_RATING, AREA5, 5 AREA6_RATING, AREA6, 6 ];
SECTION ACCESS;
UserList: LOAD * INLINE [ USERID, PASSWORD, ACCESS, AREA_REDUCTION USER1, USER1, USER, AREA1 USER2, USER2, USER, AREA2 USER3, USER3, USER, AREA3 USER4, USER4, USER, AREA4 USER5, USER5, USER, AREA5 USER6, USER6, USER, AREA6 USER7, USER7, USER, * ]; //////////////////////////////////////////////////////////////////////////// Now "AREA_REDUCTION" field in both tables are plain text. They will match.
Get Answers
Find Answers
Qlik Community
Collaborate with over 60,000 Qlik technologists and members around the world to get answers to your questions, and maximize success.
Experiencing a serious issue, please contact us by phone. For Data Integration related issues please refer to your onboarding documentation for current phone number.