Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

expression for the following scenario

I need to get the same supplier group for the common Global supplier id

Gloabal supplier id  , ncr,         scar,      partnumber ,           supplier group

ew-000891              234            145          ahaas652            CMDS

ew-000891               12                3          fa                         -

ew-000891                 -              -                -                       -

Please find screen shot.

issues.PNG.png

For that same global supplier id i need to CMDS as supplier group for the remaining two records

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: expression for the following scenario

try this

MaxString(TOTAL <[Gloabal supplier id]> [supplier group])

Clipboard01.jpg

11 Replies

Re: expression for the following scenario

Hi

How about first doing a mapping load :

SupplierGroupMap :

Mapping Load distinct

[Gloabal supplier id] ,

[supplier group]

from ............ your datasource

;


Then when you load your real data something like :


Load

ApplyMap ( 'SupplierGroupMap' , [Gloabal supplier id] )     as [Supplier Group from AppyMap] ,

*

from ............ your datasource

;

Best Regards,     Bill



Not applicable

Re: expression for the following scenario

Need to do on UI

Re: expression for the following scenario

Why ?

Not applicable

Re: expression for the following scenario

I cant change the script now i can only have expression for that..

Thanks in advance

Re: expression for the following scenario

Bill's answer is correct. Don't try and fix an incorrect data model by bodging the chart. Get the correct data model and the chart is simple.

MVP
MVP

Re: expression for the following scenario

try this

MaxString(TOTAL <[Gloabal supplier id]> [supplier group])

Clipboard01.jpg

vamshi_1957
Contributor II

Re: expression for the following scenario

write a calculated dimension instead,

= if(Global supplier id= 'ew-000891', 'CMDS', ' ' )

Not applicable

Re: expression for the following scenario

thanks, i have many global supplier id's .That's the issue

preminqlik
Valued Contributor II

Re: expression for the following scenario

here u go :

MaxString(TOTAL <[Gloabal supplier id]> [supplier group])