Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gauthamchilled
Creator
Creator

restrict field selection in dropdown

Hi,

I have a requirement to show the last two years in the dropdown box based on the current selection in the listbox. My problem is the year fields are in the format of FY2015,MY2015..FY stands for full year and MY stands for mid year.

example

if i select FY2016 in the listbox, i wanted to show .MY2016  and FY2015 in the drop down.

Years in order

FY2016

MY2016

FY2015

MY2015

.....

....

....

can anyone help?  attached an example data in the qvw file with explanation about my issue

Thanks

Gautham

1 Solution

Accepted Solutions
sunny_talwar

May be using a link table:

Data:

Load * inline

[

Country,Sales,Year,Sort

APAC,23456,FY2015,20152

APAC,23436,MY2015,20151

EMEA,287436,FY2015,20152

EMEA,287436,FY2016,20162

EMEA,23456,MY2016,20161

];

LinkTable:

LOAD * Inline [

Sort, Actualsort

20162, 20161

20162, 20152

20161, 20152

20161, 20151

20152, 20151

];

DummyTable:

Load * inline

[

AcutalYear,Actualsort

FY2015 Actuals,20152

MY2015 Actuals,20151

FY2016 Actuals,20162

MY2016 Actuals,20161

];

View solution in original post

6 Replies
gauthamchilled
Creator
Creator
Author

Any help?

sunny_talwar

May be using a link table:

Data:

Load * inline

[

Country,Sales,Year,Sort

APAC,23456,FY2015,20152

APAC,23436,MY2015,20151

EMEA,287436,FY2015,20152

EMEA,287436,FY2016,20162

EMEA,23456,MY2016,20161

];

LinkTable:

LOAD * Inline [

Sort, Actualsort

20162, 20161

20162, 20152

20161, 20152

20161, 20151

20152, 20151

];

DummyTable:

Load * inline

[

AcutalYear,Actualsort

FY2015 Actuals,20152

MY2015 Actuals,20151

FY2016 Actuals,20162

MY2016 Actuals,20161

];

gauthamchilled
Creator
Creator
Author

Thanks Sunny, May I know what Aggr(AcutalYear, AcutalYear) will do???

sunny_talwar

If you use ActualYear, you will see all the ActualYear (but greyed out which are not selectable) where as Aggr(AcutalYear, AcutalYear) will show whatever is available for selection. In fact, you should use this =Aggr(Only({<AcutalYear>}AcutalYear), AcutalYear) instead of Aggr(AcutalYear, AcutalYear)

See the comparison here:

Capture.PNG

gauthamchilled
Creator
Creator
Author

Is there a way to replace the calculated dimension used in the dropdown as direct field. Because after publishing in server, the dropdown is not appearing because of limitation??

created a new thread here.. Dropdown not working in Ajax

Gautham

sunny_talwar

Responded on your new post