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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reading variables from text files

<body><p>Hello,</p> <p>In order to create a balance report, I need to apply ratios to expenses to get an analytic view. </p> <p>I have those ratios defined within a text file. </p> <p>I use the ratios to calculate which part of Headquarters expenses is affected to each office (for exemple, I have 25.53 % of HQ that is affected to office H, 21.72 % to office P and so on). </p> <p>So I would like to create an array Ratio(offices, Overheads) to store the ratio and then apply them to the overheads expenses amounts when I load them in the script. </p> <p>My problem is that :</p> <p>1&deg;) I do not know how to manage text files (other than through a load statement)</p> <p>2&deg;) neither do I know if is possible to create a 2 dimension variable array. </p> <p> </p> <p><col width="98"></col> <col width="15"></col> <col width="47"></col> <col width="47"></col> <col width="47"></col> <tr height="17"> <td width="98" class="xl22" height="17">Office</td> <td width="15" class="xl23">Overheads </td> <td width="47" class="xl24">HeadQ</td> <td width="47" class="xl24">Sales</td> <td width="47" class="xl24">IT</td> </tr> <tr height="17"> <td class="xl25" height="17">H</td> <td class="xl26"> </td> <td x:num="25.53" align="right" class="xl24">25,53</td> <td x:num="25.56" align="right" class="xl24">25,56</td> <td x:num="24.53" align="right" class="xl24">24,53</td> </tr> <tr height="17"> <td class="xl25" height="17">P</td> <td class="xl26"> </td> <td x:num="21.72" align="right" class="xl24">21,72</td> <td x:num="27.38" align="right" class="xl24">27,38</td> <td x:num="25.72" align="right" class="xl24">25,72</td> </tr> <tr height="17"> <td class="xl25" height="17">L</td> <td class="xl26"> </td> <td align="right" class="xl24">24</td> <td align="right" class="xl24">23</td> <td align="right" class="xl24">23</td> </tr> <tr height="17"> <td class="xl25" height="17">M</td> <td class="xl26"> </td> <td align="right" class="xl24">11</td> <td align="right" class="xl24">9</td> <td align="right" class="xl24">9</td> </tr> <tr height="17"> <td class="xl25" height="17">PA</td> <td class="xl26"> </td> <td align="right" class="xl24">4</td> <td align="right" class="xl24">4</td> <td align="right" class="xl24">4</td> </tr> <tr height="17"> <td class="xl25" height="17">NA</td> <td class="xl26"> </td> <td align="right" class="xl24">6</td> <td align="right" class="xl24">6</td> <td align="right" class="xl24">6</td> </tr> <tr height="17"> <td class="xl25" height="17">S</td> <td class="xl26"> </td> <td align="right" class="xl24">1</td> <td align="right" class="xl24">1</td> <td align="right" class="xl24">1</td> </tr> <tr height="17"> <td class="xl25" height="17"> <p>B</p> <p> </p> <p>Thanks beforehand</p> </td> <td class="xl26"> <p> </p> <p> </p> <p> </p> </td> <td x:num="6.75" align="right" class="xl24">6,75</td> <td x:num="4.06" align="right" class="xl24">4,06</td> <td x:num="6.75" align="right" class="xl24">6,75</td> </tr> </p></body>

0 Replies