Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple table selections Conditional

Hi everybody,

  I have two multiple selection TIPO and UNIDAD

  When you select a TIPO, there are only two or three UNIDADEs you can choose. It depends of the TIPO.

What I need is that if you select more than one TIPO you only can choose between PESOS and EUROS in the UNIDADES Multiple Selection. How in the namy of Messi and the Pope can I do this?

Thanks in advance!

Sin título.jpg

13 Replies
sunny_talwar

Not sure I understand, can you share a sample?

Not applicable
Author

Yes, look at the photos above I have pasted.

For example, if you choose  PT in TIPO.. you only can choose beetwen EUROS, UOM, CAJAS and PESOS in UNIDAD.

If you select ME in TIPO.. you only can choose  choose beetwen EUROS, UOM and PESOS in UNIDAD.

What I need is that if you select MORE than ONE diferents TIPOS (for example: MP and PT) the ony UNIDADES avalilables are PESOS and EUROS. No matters if you choose 2 or all the TIPOS if there are more than one, you only can choose from EUROS and PESOS.

marcus_sommer

You could try to implement a relation between those fields in and-mode:

AND-Mode

AND and OR

or you need expression-filters for those multibox-fields. I'm not sure how these conditions look like and if simple expressions are enough or if you need advanced and/or nested expressions with an aggr, maybe something like this:

if(Count({< Unidad = p(Unidad)>} Tipo) > 0, Unidad)

- Marcus

marcus_sommer

In addition here a (not) quite similar case but it might give some ideas: Re: Regarding Avg.

- Marcus

Not applicable
Author

Hi Marcus,

I understand the AND-OR Mode, but I think it is not enought.

The problem I have is that all of theses  TIPOS have in comon this UNIDAD : PESOS, EUROS and UOM.
What I need is that when you select TWO TIPOS, the  only UNIDAD posible be PESOS and EUROS but NOT UOM.

I have a very poor english, please, let me know If you could understand me.

Thanks a lot in advance!

marcus_sommer

Here a small example of such a filter-expression.

- Marcus

Not applicable
Author

Marcus, Genius !!!

I use some of the data you gave me.

I was trying to solve this using a Multiple Selection Object. When I use the list box I can use expresion.
So I do this

=if(GetSelectedCount(Tipo)>1 ,if( todo=1,UM ), UM)

If the user select more than one TIPO, they only can see the UM where the field TODO is 1. I  previusly create that field and insert a 1 in PESOS and EUROS and 0 to the others UM.

But If the user only select 1 TIPO he can select all the UM for these TIPO.

Thanks a lot!!

Not applicable
Author

Sorry Marcus,

But I  realised my solution does not work at all.

When you select 2 or more  TIPOs my filter shows whats it has to shows you (only PESOS and EUROS). But when select from my filter PESOS or EUROS automatically select ALL from TIPOS.

I do not understand what is happening here.

my filter is a List Table with this code.

=if($(vTiposCount) = 0, UM,

    if($(vTiposCount) = Todo,UM))

I do not know how  to add an example here.

Can yo give some help please ???

In my list

marcus_sommer

If you clicked on answer you could change the editor-mode on the top-right from answer-window and there you will find on the bottom-right the possibility to attach a file.

- Marcus