Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
danosoft
Specialist
Specialist

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
sunny_talwar

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

danosoft
Specialist
Specialist
Author

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...

 

Anil_Babu_Samineni

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.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
danosoft
Specialist
Specialist
Author

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
Master II
Master II

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.
danosoft
Specialist
Specialist
Author

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)

sunny_talwar

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

danosoft
Specialist
Specialist
Author

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
Master II
Master II

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.