Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression query

hi all,

i have a table

id     category     value         cat1    

a        abc              10          abc

a         xxx          20             abc      

a          yyy          30            abc       

a          ddd          35            abc  

i have a straight table and working on expression:

dimension          expression:sum(value)               expression:sum(value)-sum({<cat1={category}>}value)

id                         total                                             total-cat1

a                            95                                                  85

third column is not giving me 95-10 as value it gives me 95 in third column as well.

please advise if syntax in 3 expression is correct?

thanks in advance

13 Replies
Not applicable
Author

hi rocky,

used the expression if(category<>cat1, sum(value),0)

still no desired result as per my post 2 table

please advise

thanks

boorgura
Specialist
Specialist

Can you please attach a copy of your file?

Gysbert_Wassenaar

Again... What are you talking about? Open the qvw I posted and take a good look at the straight table. It works just fine.

comm81945.PNG

See above image. If that is not the result you want, please be clear about you do want. Because as far as I can tell this is exactly what you asked for in your first post.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert,

yes it works but just to give you additional info please find atatched image of raw data and desired data and the formula you gave does work

let me know

thanks

untitled.JPG