Skip to main content
Announcements
See why Qlik was named a Leader in the 2025 Gartner® Magic Quadrant™ for Augmented Data Quality Solutions: GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II

Logic Help

Hi all,

i have one requirement can any one help me in this?

Header 1

Header 2Header 3
A1
B2
C3
D4
E5
F6

Output should come in table like

Header 1Header 2
ABC6
DEF15

A+B+C = 6

D+E+F=15

how i can do this?

thanks in advance

1 Solution

Accepted Solutions
Not applicable

Hi Abhay,

Have a look at the attached qvw.

Hope this helps.

Regards,

Jemimah

View solution in original post

13 Replies
alexandros17
Partner - Champion III

What is the logic?

You have to sum the first and the second 3 element or you have to sum Always A,B C then D E F?

In this case use a straight table

add a computed dimension:

If([Header1]='A' or [Header1]='B' or [Header1]='C', 'ABC', 'DEF')

Add a new expression:

Sum([Header 2])

awhitfield
Partner - Champion

Hi Abhay,

created a calculated dimension as follows:

=if(match(Header1,'A','B','C'),'ABC',
if(match(Header1,'D','E','F'),'DEF'))

See example attached

HTH Andy

PabloOrtiz
Partner - Creator

hi,

create a computed dimension like this

=IF([Header 1]<'D','ABC','DEF')

and an expression like this

sum([Header2])

abhaysingh
Specialist II
Author

hi Alessandro,,,

thanks for revert but this is something Static Solution... Not Dynamic.. what if my Data will Append??

suppose xyz value would come..than it will not work

abhaysingh
Specialist II
Author

Hi thanks for Revert but i am looking for dynamic solution

PabloOrtiz
Partner - Creator

Example

CELAMBARASAN
Partner - Champion

Create a Grouping based on the Criteria you want to combine.

Can you explain on what basis you are combining A, B and C?

abhaysingh
Specialist II
Author

Hi Celambarasan...

Suppose i have 100 value in header1 field than i want to group them according to first 3 letter would be ABC, than next three would be Def and so on

alexandros17
Partner - Champion III

Simply add this dimension and expression:

If(Left([Header1],1)='A' or Left([Header1],1)='B' or Left([Header1],1)='C', 'ABC', 'DEF')

Add a new expression:

Sum([Header 2])

let me know