Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
d_caprelli
Contributor II

How to show a field in group selecting another field

Hi i have this problem:

in this picture you see i have 2 customers Name SPA and Name S.P.A. in the database it was wrote with 2 different names but it is the same customer

 1.png

like you see in this under picture it is the same customer becouse it have the same customer code

2.png

so my question is:

is there a way to, when I choose by company name, to actually display all the lines of the same client code?

For example if i choose Name SPA i want to show in the table all two line: Name SPA and Name S.P.A., becouse they have the same customer code: 028820

 

 

Labels (1)
9 Replies

Re: How to show a field in group selecting another field

May be use an expression like this

Sum({<CompanyName, ClientCode = p(ClientCode)>}Measure)

Here the expression will ignore your selection on CompanyName field but then only show ClientCode which are possible based on your selection in CompanyName field

d_caprelli
Contributor II

Re: How to show a field in group selecting another field

Sorry i not understand your reply... how can i write this?

=Sum({<RAGIONE_SOCIALE, COD_CLIENTE =p(COD_CLIENTE)>}COD_CLIENTE)

this expressione say me an Error.

sorry but i not to do a Sum of nothing...

 

Re: How to show a field in group selecting another field

I would create Mapping table for that and then Implement them using Applymap() to achieve. Because, SPN and S.P.N never same while searching / selecting anywhere.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
d_caprelli
Contributor II

Re: How to show a field in group selecting another field

how can i do that, can you write the code?

i have a table with fields: RAGIONE_SOCIALE (it contain the name duplicated) and CODICE_CLIENTE (it contain the same customer code)

how can i implement my map, and after in my group how can i implement Applymap() for show what i asked before?

pradosh_thakur
Honored Contributor II

Re: How to show a field in group selecting another field

Field names are case sensitive. @sunny_talwar 's expression should work if you put the exact field name. for example instead of  RAGIONE_SOCIALE  write [Ragione sociale] and so on. Make sure you enclose them in [] if you have spaces in the field names.

Learning never stops.
d_caprelli
Contributor II

Re: How to show a field in group selecting another field

the expression do an error, the fields names are correct, it say:

error in the calculated dimensions

 =Sum({<RAGIONE_SOCIALE, COD_CLIENTE =p(COD_CLIENTE)>}COD_CLIENTE)

Re: How to show a field in group selecting another field

You need to use the set analysis in the expression and not the dimension.

d_caprelli
Contributor II

Re: How to show a field in group selecting another field

Ok, thanks for reply, but... you see my fields are RAGIONE_SOCIALE (values Name SPA, Name S.P.A.) and COD_CLIENTE, can you write how i need to write in correct way this expression for obtain what i asked before?

thanks

p.s.: this expression is in a GROUP, when i choose the selection in this group (as you see in the pictures i sent before) it need to do all i wrote, is possible?

 

 

pradosh_thakur
Honored Contributor II

Re: How to show a field in group selecting another field

1:what are the dimension in the group? names please.

2:what is the measure that results in 10, 20 etc .. the exact expression which you are using . 

 

answer these please.

Learning never stops.