Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
pskumars
Partner
Partner

MB -GB - TB conversion into GB

HI All

i have below field with different types..like MB,GB & TB in string format.. need to calculate in GB only(only numeric no need of type)..

Space

2.0 TB
79.3 GB
2.0 TB
28.2 GB
2369.8MB
257.7 GB
62.9 GB
114.2 GB
108.1 GB
9.0 GB
62.8 GB
3 Replies
Anil_Babu_Samineni

You can calculate like

If(Right(Space,2) = 'TB', Space / 1024 , Space) as Space

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
avinashelite

Try like this


if(subfiled(Space,'' ,2))='TB',subfiled(Space,'' ,1))*1024,subfiled(Space,'' ,1))) as Space

effinty2112
Master
Master

Hi Surendra,

Maybe:

Space GB
2.0 TB2048.00
9.0 GB9.00
28.2 GB28.20
62.8 GB62.80
62.9 GB62.90
79.3 GB79.30
108.1 GB108.10
114.2 GB114.20
257.7 GB257.70
2369.8MB2.31

GB = PurgeChar(Space,'BMGT')*Pick(Match(Keepchar(Space,'MGT'),'M','G','T'), 1/1024,1,1024)

Kind regards

Andrew