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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
capriconuser
Creator
Creator

minus and divide in if condition

hi 

i have   a data like this 

 

Mail BOX  Total Size

34.25 GB    50 GB

12.35 MB   50 GB

 

I want like if there is GB in Mail Box column data then want to minus that to 50 GB and if there is 'MB' then want to divide /1024 

for example

 

34.25 - 50

12.35 /1024

 

how i do this through if condition in set expression?

help plz

1 Reply
MayilVahanan
MVP
MVP

HI @capriconuser 

Try like below

If(Right([Mail BOX],2) = 'MB', KeepChar([Mail BOX], '01234567890.')/1024,
KeepChar([Mail BOX], '01234567890.') - KeepChar([Total Size], '01234567890.'))

MayilVahanan_0-1628065168720.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.