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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikapple
Creator
Creator

making column field value as a seperate row in qlikview

Hi ,

i hav e outscope and minutes in my table,

outscope values are online and degraded

i have to create the flags for online and degraded

so in the script i have  written as

if(MATCH(SCOPENAME,'DEGRADED'),'Y','N') as DEGRADESCOPE,
if(MATCH(SCOPENAME,'ONLINE'),'Y','N') as ONLINESCOPE

i have done that ,

 now the challenge is similarly for outage minutes also i have to write in sepearte column, how to do

 

Change Order NumberDisruptive change (Full)Full Outage MinutesDisruptive change (Degraded)Degraded Outage minutesDisruptive Free change
CR2578038Y84N195N

i need to show 84 as seperate and 195 as sepeearte how to do that

 

5 Replies
asinha1991
Creator III
Creator III

can you paste screen shot of original data?

if I understand correct , there will be wo rows for one change order number, one online and other degraded right?

and what are you using to create this view..table box or staright chart? if it is table box we need to do this in backed, else we can do it frontend.

Please elaborate more

PrashantSangle

can you explain with small dummy data?
Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
qlikapple
Creator
Creator
Author

the qlikview script is below

CHG_Induced_IN:
LOAD

AutoNumberHash128(NUM) AS [%InducedOutageKey],
NUM AS [IN_Num],

Date(floor(Num(DATE(Timestamp(Timestamp('1970-01-01 00:00:00.000') + OPEN_DATE/60/60/24))))) AS IN_OPEN_DATE

FROM
[\Table1.qvd]
(
qvd) ;

 

TEMP_Induced_Outage:

LOAD 


OUT_ID,
SReV_ID,
Date(Floor(Num(END_DATETIME)) ,'DD/MM/YYYY') AS Out_END_DATE,
Date(Floor(Num(START_DATETIME)) ,'DD/MM/YYYY') AS Out_START_DATE,
Interval(END_DATETIME-START_DATETIME , 'd hh:mm') AS OUTAGE_DURATION,
NUM#(text(Interval(END_DATETIME-START_DATETIME , 'mm'))) AS OUTAGE_MINUTES,

 SCOPE_CODE

FROM [OUTAGE.qvd] (qvd)
;

left join(TEMP_Induced_Outage)

Outage_Scope :

LOAD

SCOPE_CODE,
SCOPE_NAME as SCOPE_NAME

FROM
[OUT_SCOPE.qvd]
(
qvd);


left Keep(CHG_Induced_IN)

Induced_Outage:

load *,

AutoNumberHash128(PROVIDER_INCIDENT_ID) AS %InducedOutageKey,
if(MATCH(SCOPE_NAME,'DEGRADED'),'Y','N') as DEGRADESCOPE,
if(MATCH(SCOPE_NAME,'ONLINE'),'Y','N') as ONLINESCOPE
//Sum(OUTAGE_MINUTES) as TotalOUTAGEMINUTEDuration


Resident TEMP_Induced_Outage;
//group by OUT_ID;
drop table TEMP_Induced_Outage;

 

In the attached screen shot after that i  got like tis

 

qlikapple
Creator
Creator
Author

I need to show like this Change Order Number Disruptive change (Full) Full Outage Minutes Disruptive change (Degraded) Degraded Outage minutes CR2578038 Y 84 N 195 CR1762372 N 0 Y 112
asinha1991
Creator III
Creator III

disruptive change(full) and disruptive change (degraged) have different values for 84 and 195, how do you want to handle that?