Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello experts,
I am trying to calculate the loss ratio from fields that are already in the script.
I created new fields from calculating existing fields together, which seems to work except for one of them. For some reason the "Total Freq" field is not found and I'm not sure why..
Thank you in advance!
That's because this field is missing in the bottom Load. The top Load loads from the bottom Load, so if BrokerID isn't there, then it can't load it.
Try to include a star in the bottom Load
Load ... ;
Load *,
<calculation> as Total_freq
From ...
If it is just addition of multiple fields, try RangeSum().
RangeSum( Field1, Field2, Field3 ...)
You cannot use created fields in calculations to create other fields within the same Load statement.
Try a preceding load instead:
Load
Total_freq * Total_sev as Total_loss;
Load
<calculation1> as Total_freq,
<calculation2> as Total_sev,
...
See more on https://community.qlik.com/t5/Design/Preceding-Load/ba-p/1469534
Thanks Hic!
I tried that but now I am getting another error.. it says the BrokerID field is not found.
Am I missing something?
That's because this field is missing in the bottom Load. The top Load loads from the bottom Load, so if BrokerID isn't there, then it can't load it.
Try to include a star in the bottom Load
Load ... ;
Load *,
<calculation> as Total_freq
From ...
Ohh okay, that makes sense!
Thank you so much!