2 Replies Latest reply: Mar 26, 2018 1:49 PM by Dinesh Kumar RSS

    Dynamic Columns need to define in qlik reports

    Dinesh Kumar

      Dear QlikExperts,

       

      I am new to Qlik Sense.

      We had come with a below requirement. we don't know how to achieve this.

      Kindly help in achieving this result.

       

      Below is the table for the scenario.

      Here we have calculated the TotalTimeDifference against each transaction status.

      But currently we are defining only the defined slabs[of 5  minutes interval] in Qlik ETL Queries as below.

      If time difference is between 00-05 then it will display 00-05 mins, if between 06-10 then 06-10 mins and so on as below.

      But the requirement is that user should pass some dynamic values, if they pass somewhere 10 then time difference should be calculated based on 10 minutes interval, Also Column names should change accordingly like

      00-10 mins,11-20 mins,21-30 mins and >30 mins

       

      Please help in achieving this result.

      Thanks in Advance ...!

       

      TransactionNoTransactionStatusStatusCompletionTotalTimeDifference in minutes
      [Transaction at E -
      Transaction at A]
      Statndard Query used for Displaying in Qlik reports
      IND00123Transaction at A(Begin Status)2018-03-20 00:09:1061 minutes

      Currently we are displaying the standard  output as below

      if the total difference is
      Less than 5 then -- 00 -05 mins
      Between 5 to 10-- 05- 10 mins
      Between 11 to 15-- 11- 15 mins
      Greter than 15 -- > 15 minutes

      Transaction at B2018-03-20 00:09:12
      Transaction at C2018-03-20 00:09:13
      Transaction at D2018-03-20 00:09:14
      Transaction at E(End Status)2018-03-20 01:10:03

       

       

      Below is the Qlik Query Used:

       

      Load *,

      if(isnull(timedifference),'Not Applicable',if(timedifference <=5 ,'00-05 mins',

      if(timedifference >5and timedifference <=10, '06-10 mins',

      if(timedifference >10 and timedifference <=15, '11-15 mins',

      '>15 mins','Above an hour')))) as TotalTAT

      Resident TableName;