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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

Convert Size of Building in the script

Hi,

I have a table that hold Building ID, Size and Size Type.

Some Ids  are typed in SF and some other are typed in Hectares and others are SQ.m.

How can I get the right size for all of them in SF

Like could I do IF sizeType = Sq.m. then Size * Factor1

                              If Size Type = hectares then Size * Factor2

                                   if size Type = SF then Size *1

                                             end as Size SF

Thxs,

Alec

Labels (1)
1 Solution

Accepted Solutions
manojkvrajan
Luminary
Luminary

You can do that in many different ways. However, my suggestion is to incorporate the following logic with an additional field if you are very sure about displaying the values in SF. Please make sure you have the righ conversion logic factor in place. I hope this helps.

Factor 1 = 10.76

Factor 2 = 107639.10416709722

Table:

LOAD

[Building ID],

[Size Type],

IF([Size Type] = 'Sq.m',[Size]*10.76,

IF([Size Type] = 'Hectares',[Size]*107639.10416709722, Size)) AS Size

FROM

xyz.qvd;

View solution in original post

5 Replies
manojkvrajan
Luminary
Luminary

You can do that in many different ways. However, my suggestion is to incorporate the following logic with an additional field if you are very sure about displaying the values in SF. Please make sure you have the righ conversion logic factor in place. I hope this helps.

Factor 1 = 10.76

Factor 2 = 107639.10416709722

Table:

LOAD

[Building ID],

[Size Type],

IF([Size Type] = 'Sq.m',[Size]*10.76,

IF([Size Type] = 'Hectares',[Size]*107639.10416709722, Size)) AS Size

FROM

xyz.qvd;

alec1982
Specialist II
Specialist II
Author

Thank you so much!

alec1982
Specialist II
Specialist II
Author

Somehow the Sq.m is not working..

I have double checked everything and I dont know why it is not working.!

manojkvrajan
Luminary
Luminary

Please share me a sample data file and qvw to work.

alec1982
Specialist II
Specialist II
Author

My bad!

it is working perfectly!

Thank you