Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

how to variable name to Diffrence

Hi Friends,

I crated Pviot table with values Sum(A) adn Sum(B). I want to take diffrence between these two values.

I created a varibale vDiff=Sum(A)-Sum(B). Its giving me a total aggregation difference.

.

Please let me know how to only difference between Sum(A) and Sum(B) specific to that row only.

Thanks

Tags (1)
12 Replies
manideep78
Valued Contributor

Re: how to variable name to Diffrence

Hi

Take A and B as Dimensions.

Now add an expression RangeSum(A)-RangeSum(B)

Hope this helps.

Regards,
Manideep

Not applicable

Re: how to variable name to Diffrence

Hi,

Add one more expression in pivot table with Expression label1-Expression label 2.

which will be nothing but Sum(A) -Sum(B) specific to that row only.

senpradip007
Valued Contributor III

Re: how to variable name to Diffrence

Give names for Sum(A) and Sum(B), for example let say you give Sum(A) as colA and colB for Sum(B). Now you can write colA - colB and you will get your desire result.

Not applicable

Re: how to variable name to Diffrence

RangeSum will work.

Please see if that helps.

Thanks!

Re: how to variable name to Diffrence

Hi.

write third expression as 

Sum(A)-Sum(B)

or

Column(1)-column(2)


Regards

ASHFAQ

anbu1984
Honored Contributor III

Re: how to variable name to Diffrence

You can use labels assigned to Sum(A) and Sum(B). Check this

Not applicable

Re: how to variable name to Diffrence

Please send the code I am working on Personal Edition

Not applicable

Re: how to variable name to Diffrence

Thanks Freinds

But I want to assign a varibale to Sum(A)-Sum(B).

Thanks

Pavan

anbu1984
Honored Contributor III

Re: how to variable name to Diffrence

Do you want to store difference for any particular row in the variable? What is the condition to select that row?

Community Browser