Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

get Value of a aggregated Value and subtract them and Display them

Hey guys im new to qlikview so pleas help me.

How do i get the aggregated value of total and total2 out of this diagramm and then subtract it and display it in a textbox?

Unbenannt.png

1 Solution

Accepted Solutions
leni_balakrishn
Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

Hi,

To remove the aggregated total from the chart, Choose "No Total" radio button in Expression tab as below,

Sample.PNG

and to show the difference between total & total2 in text box use as below,

=Sum(total)-Sum(total2)

9 Replies
Gysbert_Wassenaar
Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

=Rangesum(Sum(total2), -sum(total))


talk is cheap, supply exceeds demand
raghvendra_singh
Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

Try this one in text box:-

=sum(TOTAL (total)) - sum(TOTAL (total2))

Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

With your Solution qlikview doesn't recognize "total", how can i make him recognize that field?Unbenannt.PNG

Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

With your Solution qlikview doesn't recognize "total2", how can i make him recognize that field?Unbenannt.PNG

leni_balakrishn
Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

Hi,

To remove the aggregated total from the chart, Choose "No Total" radio button in Expression tab as below,

Sample.PNG

and to show the difference between total & total2 in text box use as below,

=Sum(total)-Sum(total2)

jagan
Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

Hi,

Try like this

=Rangesum(Sum(total2Expression) - Sum(totalExpression)

Hope this helps you.

Regards,

Jagan.

Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

I have a problem with your solution.

Qlikview doesn't recognize the fields that i want to sum.

I tried to change the names of my colums but that also didn't help.

Unbenannt.PNGUnbenannt.PNG

How can i make him recoginze these?

Gysbert_Wassenaar
Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

Use the correct case sensitive field names or the label names of other expressions. Use the same case sensitive names. To Qlikview Sales, SALES, sales and SaLes are four different fields.


talk is cheap, supply exceeds demand
leni_balakrishn
Not applicable

Re: get Value of a aggregated Value and subtract them and Display them

Hi,

Please use the expression you have used in the chart for columns a & b and not the column name a,b.

Example,

Sample.PNG

In the above screenshot I have used Sum(Col3) for Col3 and Sum(Col5) for Col5, so to find the difference between Col3 and Col5 we need to calculate as Sum(Col3)-Sum(Col5)