Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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
phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

What happened when you add below expression with "Contractos" as dimension.

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

Anonymous
Not applicable
Author

Thanks Phaneendra for reply,

I obtain a huge list of Contratos with a 1 in each row. For the selection I use now, I expect only 4 rows.

Any idea?

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

Is it possible to share your qvw? and how many u see in the count expression

Not applicable
Author

Use Contrato as dimension

and expression like:

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

Anonymous
Not applicable
Author

Se attached.

Testing with selection TecnicoId=20724, in the left side you have the output table, and in the right side you have the expected output (running in an alternate state).

Thanks.

Marc.

Anonymous
Not applicable
Author

Angad, it gives me a dimension error...

Not applicable
Author

You must use Contrato as dimension

and expression like:

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

Not applicable
Author

Use Contrato as dimension

and expression as

count({1<CanaldeVentaId=p(TecnicoId),  TipoRelacion={'R'}>} DISTINCT Contrato)

Thanks,

Singh

Anonymous
Not applicable
Author

Phaneendra Kunche and Angad Singh,

I was too fast in my answer. There's still something wrong. I re-attach the sample with the modified expression and the state well linked in the table Result.

Please tell me.

Thanks!