Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Re: Get file name in a textbox

Yes it is!! (check that next to xls there are 2 ''):

The code with ERRATA CORRIGE is:

=right(SubField('C:\Users\vmosca\Desktop\CRUSCOTTO ICT GENERALI - ECONOMICS DC E FC_2\DATI\FILE INPUT\FMS_CONSUMO\FMS_CONSUMO\FMS_Consumo_20****.xls','.',-2),2)


So, the formula is right! Thnx a lot!

But still I have a problem: I used **** because I thought the software would have given numbers/letters instead of ****.

How can I get MONTH automatically, without any manual changes in textbox code when I do updates?

Highlighted
Employee
Employee

Re: Get file name in a textbox

Since you´re hardcoding your filename is tough to calculate this,

Why don´t you use FileBaseName() while reading your excel file? This would populate a field into your data, so it would be automatic to get that information

Highlighted

Re: Get file name in a textbox

LOAD somefields,

          Month(Date#(Right(FileBaseName(),2),'MM')) as Month

FROM path\FMS_Consumo_201412.xls

...


should deliver 'Dec'.


hope this helps


regards


Marco

Highlighted
Not applicable

Re: Get file name in a textbox

Hi Marco,

The option you gave me wasn't so helpful, unfortunately!

I also thought another way.

Given a column in the xls file than I want to load, the data in the column is the same for each 4k and more rows and is "CNSM11". This number will change any time an update is available.

So, I thought to load a specific cell (e.g. A2) from the xls file and apply the Right formula to get the last 2 numbers of the value in the cell.

Do you think this is a possible solutions?

Can you give me a hint?


Thanks in advance!