Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Merging data

I need to merge data in pivot table, for example:

Grade "A" + Grade "CYA" = A+

Grade "B" + Grade "CYB" = B+

i want to merge all value in one expression.

i use this expression:

=if(Grade = 'A', 'A+',if(Grade='CYA','A+',if(Grade <> '', PurgeChar (Grade,''))))

to merge only one value A + CYA = A+

testd.png

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Merging data

I need to merge data in pivot table, for example:

Grade "A" + Grade "CYA" = A+

Grade "B" + Grade "CYB" = B+

Create a new field in the script that links the original grades to your new grades:

Grades:

LOAD * INLINE [

ReportGrade, Grade

A+, A

A+, CYA

B+, B

B+, CYB

...etc

];

Then use the new field ReportGrade as dimension in your bar chart.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Merging data

I need to merge data in pivot table, for example:

Grade "A" + Grade "CYA" = A+

Grade "B" + Grade "CYB" = B+

Create a new field in the script that links the original grades to your new grades:

Grades:

LOAD * INLINE [

ReportGrade, Grade

A+, A

A+, CYA

B+, B

B+, CYB

...etc

];

Then use the new field ReportGrade as dimension in your bar chart.


talk is cheap, supply exceeds demand

View solution in original post

Highlighted
MVP & Luminary
MVP & Luminary

Re: Merging data

Hi,

Change you script like below

LOAD

*,

if(Grade = 'A', OR Grade='CYA','A+',

if(Grade = 'A', OR Grade='CYB','D+', Grade)) AS New_Grade

FROM DataSource;


Now use the new column New_Grade in dimension, this will merge the data as you expected.


Regards,

Jagan.



Highlighted
Creator III
Creator III

Re: Merging data

Write condition on Dimension like that for all grade

if(Grade = 'A' or Grade='CYA','A+',

if(Grade = 'A-' or Grade='CYA-','A-',

if(Grade = 'B-' or Grade='CYB-','B-',

if(Grade = 'B' or Grade='CYB','B',

if(Grade = 'B+' or Grade='CYB+','B+',

if(Grade = 'C' or Grade='CYC','C',Grade

))))))

i implemented on qvw file also

hope these help you