Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Show/hide rows in table based on selection

Hi community,

I need to show in a table some rows based on the current selection. I mean, at the same way I obtain the result in a text box of this experession:

count({1<CanaldeVentaId=p(TecnicoId), InicioContratoEjercicioMes=p([FInicio EjercicioMes]), TipoRelacion={'R'}>} DISTINCT Contrato)

now I need to show these 'Contratos' involved in the set analysis selection.

I tried with a calculated dimension:

=aggr({1<CanaldeVentaId=$::TecnicoId, InicioContratoEjercicioMes=$::[FInicio EjercicioMes], TipoRelacion={'R'}>} Contrato, Contrato)

but it doesn't work .

Any help?

Thanks in advance.

Marc.

15 Replies
Not applicable
Author

Use below in expression for Result Table:

=only({1<CanaldeVentaId=$::TecnicoId,  TipoRelacion={'R'}>}Contrato)

The main issue is with below statement, both of these columns are not have similar values.

For this case

InicioContratoEjercicioMes : example: jun 2014

FInicio EjercicioMes: (state-ToDo) : example: 07-2014

InicioContratoEjercicioMes=$::[FInicio EjercicioMes]


You need to make them into same format to match and then use it in expression.


Hope this was helpful.


Thanks,

Singh

Anonymous
Not applicable
Author

Singh,

I understand you mean that the trouble is with this month fields' format. I loaded now InicioContratoEjercicioMes as 'MM-YYYY' but it isn't working yet.

I re-attach with modifications.

Thanks Singh.

Not applicable
Author

But if I select the other 2 fields then I can see the value. Can you please check attached.?

Thanks,

Singh

Anonymous
Not applicable
Author

Singh,

I created ToDo state just to see the expected result. If you select values in a list linked to this state, of course it is working well. Let's say I created the objects in the rifgt side just to check if the value in result is exactly the expected. The list objects you created are in ToDo state...

The idea is the user will not be able to make selections in InicioContratoEjercicioMes. So, that is why I'm giving the possibles values from [FInicio EjercicioMes] to InicioContratoEjercicioMes. This, cobined with selection in TecnicoID, will give me the list of Contratos involved in.

For instance, if i have

Contrato      TecnicoId      CanaldeventaId

A                    20724          1234

B                    20724          5678

C                    9876            20724

omitting the month fields, if the user select TecnicoId=20724, i want the table to show the Contrato C, because is the only one where CanaldeVentaId equals TecnicoId.

Any idea?

And thanks again for helping.

Not applicable
Author

Your scenario will work if you use P() function, which is just like wildmatch search of possible values.

But the case is when you use Alternate State, it is not actually checking possible values, but the selected value(single value) (as per my understanding)

And for each [FInicio EjercicioMes] we have multiple InicioContratoEjercicioMes, so may be that is why it is not working.

It will great, if you create a new thread, with particular this scenario, so that rest of the members might also help.

Happy to Help

Singh

Anonymous
Not applicable
Author

Thank you Singh. I prepare a better sample and I start a new thread.

Marc.