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

Set expression to add the value of both account codes & show the same against 1st code

Dear Friends

Following codes are carrying balances & I need to add the value of (77500+77511) & make appear the total against 77500 code. Like wise all other codes too need to be shown the addition of both code values & to be shown as above. Also I need to show only 77500,77480,77460,77760 when the dimension ACCOUNT CODE is populated. How I will achieve this

 

77500
77511
77480
77481
77460
77461
77760
77761

Thanks in advance

Neville

1 Solution

Accepted Solutions
andrey_krylov
Specialist
Specialist

Try this

Sum({< ACCOUNT_CODE = {'77*'} >} Aggr(If(Right(ACCOUNT_CODE, 1) = 0, BALANCE) + Below(If(Right(ACCOUNT_CODE, 1) <> 0, BALANCE)), ACCOUNT_CODE))

View solution in original post

6 Replies
andrey_krylov
Specialist
Specialist

Hi, I think you can try to use some kind of logic in the expression to achieve the desired result

nevilledhamsiri
Specialist
Specialist
Author

Dear Andrey, Please send me your expression in the body of the reply. I cannot open the qvd as I am on a personnel edition

Thanks

Neville

andrey_krylov
Specialist
Specialist

Try this

Sum({< ACCOUNT_CODE = {'77*'} >} Aggr(If(Right(ACCOUNT_CODE, 1) = 0, BALANCE) + Below(If(Right(ACCOUNT_CODE, 1) <> 0, BALANCE)), ACCOUNT_CODE))

nevilledhamsiri
Specialist
Specialist
Author

Hi Andrey, Fine it works, Also  please send me the expression to leave only those codes with balances & suppress all other codes. (Need to hide codes end with 1)

Thanks a lot

Neville

andrey_krylov
Specialist
Specialist

Hi Neville. I think you need to turn of the first expression

nevilledhamsiri
Specialist
Specialist
Author

Thank you very much dear Andrey

Neville