Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
kris_vliegen
Partner - Creator III
Partner - Creator III

Show other value in listbox

Hello,

I have a dashboard where I connect to with a parameter Monthnumber because we use the monthnumber in the program that calls our dashboard.

In my dashboard I show the monthnames like (jan, feb, ..)

Is it possible that I use the Field Monthnumber but that qlikview shows the monthnames in a listbox??.

Or that if I get monthnumber 12 he automatic select dec in the dashboard.


Regards,

KrisMonth.JPG.jpg

7 Replies
datanibbler
Champion
Champion

Hi Kris,

in principle yes, very much is possible.

If you just want the user to see the month_names in proper format - there is an object "listbox" that you can add and if you scroll down the list of fields in that object's dialog, you'll find "formula" and there you can use the MONTH() fct.

Another possibility would be to use a mapping table in the script and thus get the month_names directly.

Where does that month_nr come from? Knowing more about your scenario might help in finding a solution.

Best regards,

DataNibbler

kiranmanoharrode
Creator III
Creator III

Dear Kris,

          if your MonthName and MonthNumber are assosiated with each other then you can use MonthName in GUI selection list boxes. Becouse of Qlikview assosiated Query language. It wont hamper working of MonthNumber field working that calls your Dashboard

Regards

Kiran Rode

kris_vliegen
Partner - Creator III
Partner - Creator III
Author

Hella,

this is the script where I define the CalMonthNum and CalMonth

scriptcallmonth.JPG.jpg

Thanks for your quick respons.

But if I use the month function I only get 2 months

These are the values of ValMonthNumCalMonthNum.JPG.jpg

and this is what i get after the Month-function

CalMonth.JPG.jpg

Regards,

Kris

Colin-Albert

It looks like this the field is a dual field. Try using num(MonthName) in the listbox.

Select <expression> in the field list to use an expression in the list box, not the Expressions tab.

Anonymous
Not applicable

Hi Kris


A few days ago I had the same problem. My solution for that is very easy:

I created a variable called "vL.SelectMonth" with this content:

if(isnull(GetFieldSelections(Month)), num(month(Today(2))), GetFieldSelections(Month))


Remark: "Month" is the field of my calendar.

On my dashboard I have a straight table with expressions and set analysis:

sum({<MonthlyTargetReportingMonth = {$(vL.selectMonth)}>}Value)

Not applicable

Hi, Try creating an inline table with Monthnumber and Monthname field. This will give the expected result.

MonthNameTable:

Load * inline[

1,Jan

2,Feb

.......

....

12,Dec

];

kris_vliegen
Partner - Creator III
Partner - Creator III
Author

Hello,

I found a solution.

I put this in my fieldexpression 

=Month(date#( '2012' & num(CalMonthNum,'00') & '01', 'YYYYMMDD' ))

Thanks for the help!

Kris