Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
curiousfellow
Specialist
Specialist

value expression in listbox disappears when selection is made

Our financial year starts in september. So september is month 1, october = month 2 etc,etc

Now I want users to select monthnumber in a listbox, but I want to display the name of the month too.

so I made an expression like this : 

=left(
if( Monthnumber < 5,
aggr(Only({1}monthname('1-'&(Monthnumber+8)&'-2019' )),Monthnumber) ,aggr(Only({1}monthname('1-'&(Monthnumber-4) &'-2019')),Monthnumber)
)
,3)

 

When no selection is made all monthnames are displayed but when a month is selected only that monthname is displayed and others are not.

Please see attached qvw

How to achieve that monthnames are allways displayed in my listbox ?

 

 

1 Solution

Accepted Solutions
jaibau1993
Partner - Creator III
Partner - Creator III

But, if you still want to do it in the front-side, try something like

Month(Date#(if(Only({1}Monthnumber) = 4, 12, Mod(Only({1}Monthnumber)+8, 12)), 'M'))

Regards,

Jaime.

View solution in original post

4 Replies
jaibau1993
Partner - Creator III
Partner - Creator III

Hi!

I think that you shoud create the appropiate dimension in the script, something looking like "1 - Sep", "2 - Oct", etc.

Regards,

Jaime.

jaibau1993
Partner - Creator III
Partner - Creator III

But, if you still want to do it in the front-side, try something like

Month(Date#(if(Only({1}Monthnumber) = 4, 12, Mod(Only({1}Monthnumber)+8, 12)), 'M'))

Regards,

Jaime.

curiousfellow
Specialist
Specialist
Author

That works indeed, i will try to understand this expression. Thanks

😀

jaibau1993
Partner - Creator III
Partner - Creator III

Let me know if you do not understand how it works! 😊