Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Srinivas
Creator
Creator

how to display with pre-fix and with pre-fix values

Hi All,

I want to display as like below screen shot way who have two values like with pre-fix value and without pre-fix value as a another table or qvd.

img.PNG

Am attaching file and data, Could you please help me on this.

Advance Thanks,

Munna

19 Replies
help4qv123
Creator II
Creator II

Gud 1

Srinivas
Creator
Creator
Author

Thanks Peter,

I hope its correct in frontend but i need in backend as a qvd like below screenshot way,

img1.PNG

Advance Thanks

munna

Srinivas
Creator
Creator
Author

Yes Ankita,

Could you please suggest to me how to do.and hoe make this.

Not applicable

First of all you have to identify , in which condition you want to display with pre-fix and without pre-fix.

Based on some column you should write IF ELSE (Case Statement in you script) or in application and will work perfectly.

From your Screenshot I can see If LOCAL_DESCRP is not NULL then you want to display with pre-fix else without pre-fix.

So you should write case statement based on column LOCAL_DESCRP or else identify the right column from you data and write case statement.

Srinivas
Creator
Creator
Author

Hi Shivendoo,

Can you please give me example application.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

How about this?

RawData:

LOAD CHAN_ID,

     PROD_CD,

     [Product Number],

     LOCATOR,

     LOCAL_CD,

     LOCAL_DESCRP

FROM [.\MLE.xls](biff, embedded labels, table is Sheet1$);

LEFT JOIN (RawData)

LOAD PROD_CD, COUNT(DISTINCT [Product Number]) AS Occurrences

RESIDENT RawData

GROUP BY PROD_CD;

FinalTable:

NOCONCATENATE LOAD * RESIDENT RawData WHERE Occurrences > 1;

DROP Table RawData;

STORE FinalTable INTO [.\MultipleProductNumbers.qvd] (qvd);

See attached document for an example. Modify to suit your needs.

Peter

Srinivas
Creator
Creator
Author

Thanks Peter,

It's almost correct but I need one more modification , In our scenario displayed when CHAN_ID is different, Here I need wherever CHAN_ID should be same and then product number have pre-fix and without pre-fix value i need to display.see below screenshot ,this is my requirement.

Img2.PNG


Regards,

Munna

Srinivas
Creator
Creator
Author

Hello Peter can you please help me on this scenario.

Best,

Munna

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You should have a field that ties rows together (e.g. in your example the two rows have no relation except an identical CHAN_ID). If it isn't present, create one. For example, when loading the data from excel, create a new field without optional prefix, like:

...IF (mid([Product Number], 3, 1) = '-',

       mid([Product Number], 4), [Product Number]) AS [Core Product Number], ...

Change the GROUP BY clause of the next LOAD statement into:

GROUP BY CHAN_ID, [Core Product Number];

That's about it.

Peter

Srinivas
Creator
Creator
Author

Thanks for your support Peter,

Could  you please send me sample application.That would be more helpful.

Regards,

Munna