Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gamaplast
Contributor III
Contributor III

Variable in listbox

Hello guys,

in a straight table I have a column which values are represented by a variable; I'd like to select the table rows in a similar way as if I have a listbox with all the possible variable values (like what happens with the database fields).

Is it possible to do?

Thanks.

 

1 Solution

Accepted Solutions
gamaplast
Contributor III
Contributor III
Author

Hello Marcus,

thank you for your suggestions; I've tested both of them but they don't work properly.

I've found the solution by extracting a new table from the database with a specific query in the script section, so that I have a field which could be selected the sheet.

R.

View solution in original post

4 Replies
marcus_sommer

Within the tab presentation (top left) you could enable for each dimension in the table a select-dropdown. After it each of this columns get a little black triangle in the header which then worked quite similar to the listbox.

- Marcus

gamaplast
Contributor III
Contributor III
Author

Hello Marcus,

Thank you for the suggestion!

I've moved the formula which calculates the values to be filtered from the expression (where the flag you indicated is not available) to the dimension set, arranging the formula with the Aggr() function, but it doesn't work properly:

- the header of the dimension colums tells the is an error in the formula (!) which not compares in the formula window

- the combo selection on the header of the table has an unexpected and uncomprehensible behavior and does not select the rows as it would be logical to expect.

Would you mind to help me?

Here attached you can find the qvw file.

Thank you so much in any case.

R.

marcus_sommer

It's difficult to say what caused your issue in the end but I suggest to simplify your approach. This starts with resolving the synthetic key between your tables (just concatenating both fields into an extra-field would do the job). Usually such synthetic key is regarded as workable but I'm not sure that's always true, for example by using them within aggr-functions.

Further if the context of the aggr() are the same you could often do it within a single aggr() and don't need to apply multiple ones. Probably the same is true for your second condition within the if-loop which might be applied as set analysis condition or just as multiplicator because it looked that's just a flag. This means the following:

If (Aggr(Sum(OrdiniVendita.QtaOrdinata), NumOrdineCli, RigaOrdineCli) <=Aggr(Sum(OrdiniVendita.QtaSpedita), NumOrdineCli, RigaOrdineCli) and Not Aggr(DISTINCT BolleOrdiniVendita.NonConsegnata, NumOrdineCli, RigaOrdineCli),'Evasa',

might be changed into:

If(Aggr(Sum(OrdiniVendita.QtaOrdinata * BolleOrdiniVendita.NonConsegnata)<=Sum(OrdiniVendita.QtaSpedita * BolleOrdiniVendita.NonConsegnata), KEY),'Evasa', ...

or

If(Aggr(Sum({< BolleOrdiniVendita.NonConsegnata = {0}>} OrdiniVendita.QtaOrdinata)<=Sum({< BolleOrdiniVendita.NonConsegnata = {0}>} OrdiniVendita.QtaSpedita), KEY),'Evasa', ...

- Marcus

gamaplast
Contributor III
Contributor III
Author

Hello Marcus,

thank you for your suggestions; I've tested both of them but they don't work properly.

I've found the solution by extracting a new table from the database with a specific query in the script section, so that I have a field which could be selected the sheet.

R.