Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Select data from a loaded excel file

I have loaded this data from an excel file in my Sense app.

How can i select the value to a textbox for the current week and a specific country?

 

week/countrySF
2019-6103,975132,1342
2019-7103,975132,1342
2019-8103,975132,1342
2019-9101,100331,2457
2019-1093,9130329,02444
2019-1193,9130329,02444
2019-1293,9130329,02444
2019-1393,9130329,02444
2019-1496,5962629,85371
2019-1597,0434729,99192
3 Replies
Highlighted
Creator III
Creator III

Hey,

you need to get current week in correct format so the YYYY-WW, just add this to the loading script:

LET v_currentWeek = Replace(weekname(today()),'/','-');

After that in the text box add measure: 

MinString({<Week = {'$(v_currentWeek)'}>}S)

This is what I get: 

Przechwytywanie.PNG

 

Highlighted
Creator
Creator

Should I change the format in the loading of the excel ?

LOAD
F1 as new_week,
Sweden,
Finland,
Norway,
Estonia,
Lithuania
FROM [lib://1.3.21.

Highlighted
Creator III
Creator III

I think you can leave it as it is. 

Just add this one line in the load script:

LET v_currentWeek = Replace(weekname(today()),'/','-');

and later on use it to show the data. 

MinString({<Week = {'$(v_currentWeek)'}>}S)

Text in green will select the week based on the week of today's date. Red 'S' is where you type the name on the country you want to show.