Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community.
I'm here today with what must be a really easy task.
I need to insert a Field but only when is equal to other column values.
Here is my table:
Nombre | Categoría |
Manuel Andres | JPE |
María del Mar | JPE |
Gabriela Susana | Supervisor |
Gustavo | Director |
Christian | Senior |
Damian Uriel | JP |
Ramon | Gerente |
Hernan | Gerente |
Leandro Martin | Senior |
Carlos Matias | Senior |
I want to insert in my table in Qlik Sense the Column "Nombre" when "Categoría" is equal to JP, JPE and Senior.
I bet this has to be like the easiest thing in Qlik but I can't figure out how to do it.
Thank you in advance.
Regards.
When using it as a dimension you need an Aggr function, try this:
=Aggr(Only({<Categoria = {'JPE', 'JP', 'Senior}>} Nombre), Nombre)
Alternatively this should also work:
=If(Match(Categoria, 'JPE', 'JP', 'Senior), Nombre)
But my suggestion is that you can get the same result by using set analysis in all your expressions. You just need to use Nombre as dimension and then within the expression use {<Categoria = {'JPE', 'JP', 'Senior}>}
For example if your current expression is -> Sum(Sales), change it to Sum({<Categoria = {'JPE', 'JP', 'Senior}>}Sales) Your Nombre will only show those names which are from one of the three Categoria listed in the set analysis. This is more efficient then using calculated dimension.
May be this:
LOAD Nombre,
Categoria
FROM Source
Where Match(Categoria, 'JPE', 'JP', 'Senior');
To clarify, I need to Load all the categories, however, in the table view I'm making in Qlik Sense, I only have to show JP, JPE, Senior.
Thank you for your reply.
Oh okay, may be this in that case:
{<Categoria = {'JPE', 'JP', 'Senior}>}
This will go within all your expressions.
Thank you for quick reply Sunny-T but still need help.
The expression you gave is looking good but I need to insert the "Nombre" Column when {<Categoria = {'JPE', 'JP', 'Senior}>}
How do I do it?
Thank you again!
Not entirely sure how and where you are using this, but may be this:
Only({<Categoria = {'JPE', 'JP', 'Senior}>} Nombre)
Qlik Sense, as Dimension, in a Table.
There, where it says Colaborador JP-Seniors. I need to insert only the "nombre" when is equal to those categories.
If I paste what you gave me Only({<Categoria = {'JPE', 'JP', 'Senior}>} Nombre) it says Error in Expression.
Try adding a , before Nombre, didn't work.
The Field "Nombre" is not being recognized as a Field.
Thank you.
Regards.
When using it as a dimension you need an Aggr function, try this:
=Aggr(Only({<Categoria = {'JPE', 'JP', 'Senior}>} Nombre), Nombre)
Alternatively this should also work:
=If(Match(Categoria, 'JPE', 'JP', 'Senior), Nombre)
But my suggestion is that you can get the same result by using set analysis in all your expressions. You just need to use Nombre as dimension and then within the expression use {<Categoria = {'JPE', 'JP', 'Senior}>}
For example if your current expression is -> Sum(Sales), change it to Sum({<Categoria = {'JPE', 'JP', 'Senior}>}Sales) Your Nombre will only show those names which are from one of the three Categoria listed in the set analysis. This is more efficient then using calculated dimension.
You got it! It worked!
Thank you a lot, again!
Regards!
Hahahaha, More like 'We got it'