Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combine Data Values in Bar Chart

I have a dimension "Area ID" which branches into 4 departments: "ASM", "BIW", "C-2", and "PNT"..... I want to REPLACE "ASM" with "TCF", CHANGE "C-2" & "PNT" to "PAINT", and keep "BIW".... Is this possible through an expression? Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

May be use a calculated dimension or make changes in the script using if statements:

Calculated dimension

If([Area ID] = 'ASM', 'TCF',

If(Match([Area ID], 'PNT', 'C-2'), 'PAINT', [Area ID]))

script:

If([Area ID] = 'ASM', 'TCF',

If(Match([Area ID], 'PNT', 'C-2'), 'PAINT', [Area ID])) as [Area ID]

View solution in original post

4 Replies
sunny_talwar

May be use a calculated dimension or make changes in the script using if statements:

Calculated dimension

If([Area ID] = 'ASM', 'TCF',

If(Match([Area ID], 'PNT', 'C-2'), 'PAINT', [Area ID]))

script:

If([Area ID] = 'ASM', 'TCF',

If(Match([Area ID], 'PNT', 'C-2'), 'PAINT', [Area ID])) as [Area ID]

vikramv
Creator III
Creator III

Try using like this in your script for [Area ID]...

pick(match([Area ID],'ASM','BIW','C-2','PNT'),'TCF','BIW','PAINT','PAINT') as [Area ID]

or

Try using like this in your dimension for [Area ID]...

pick(match([Area ID],'ASM','BIW','C-2','PNT'),'TCF','BIW','PAINT','PAINT') as [Area ID]


Not applicable
Author

Thanks Again!

sunny_talwar

No problem at all