Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qlik107
Contributor II
Contributor II

How to Calculate concatenated strings in Set Analysis

I have a GP Target table with Targets as Month1, Month2,..........,Month12 . I want to calculate YTD for specified consultant for Month11. So it must sum the values from( Month1+Month2............+Month11). I have achieved to calculate target for current Month. But no success on YTD. I have attached the GP Target Excel File also . So please provide any suggestions ASAP.

1 Reply
ali_hijazi
Partner - Master II
Partner - Master II

you need to use cross table so that you transform month1, month2 columns into rows

then all your months will be under one column named month

as per the excel sheet that you sent

your script will be somehting like this:

test:

LOAD [Emp ID],

     Name,

     Level,

     Location,

      [115.71],

     A,

     B,

     C,

     [0.15],

     A1,

     B1,

     C1,

     A2,

     B2,

     C2,

     F28,

     [Our Targets],

     Var,

     Var%,

     AF,

     AG,

     Month1,

     Month2,

     Month3,

     Month4,

     Month5,

     Month6,

     Month7,

     Month8,

     Month9,

     Month10,

     Month11,

     Month12

   

FROM

[folder\Target cascade template.xlsx]

(ooxml, embedded labels, table is [IC spread]);

CrossTable(Month,Value,21)

load * resident test;

drop Table test;

I can walk on water when it freezes