Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field 'space used'. This is either in MB or GB.
data looks like this:
3123MB
10GB
1400MB
12GB
I want to display the entire column in terms of GB. So i have to convert my MB data to GB. Just dividing by 1024 doesnt work since Qlikview considers this to be a string.
How can i do this?
How about:
=alt(num#(F1, '0MB')/1024
,num#(F1, '0GB')+0
, F1)
-Rob
Hi,
this should help:
data:
LOAD * INLINE [
F1
3123MB
10GB
1400MB
12GB
];
result:
load if(right(F1,2)='MB', Num#(Mid(F1, 1, Len(F1)-2))/1024, Num#(Mid(F1, 1, Len(F1)-2))) as [space used]
Resident data;
- Ralf
Hi Ralf,
So i was hoping to change this in the expressions column of the graph. How should i enter this in the IF statement?
This is what i am working with right now:
if (wildmatch (space_used = '*MB')>0), space_used * (1/1024), space_used)
so this says that is you find MB then divide by 1024 else display as it is.
even this doesnt work: if(wildmatch(gp_rss_ram,'*M')>0, (Len(gp_rss_ram)-2)*(1/1024),gp_rss_ram)
This worked: if(wildmatch(gp_rss_ram,'*M')>0,num#(gp_rss_ram, '#M')/1024,num#(gp_rss_ram,'#G'))