Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview variables definition - equal vs no equal

In Qlikview variables, what is the difference between the following definitions for a variable X -

  • =SUM(Sales)
  • SUM(Sales)

Thanks.

6 Replies
chiru_thota
Specialist
Specialist

=Sum(Sales)  -  will be pre calculated as per your selections.

Sum(Sales)    - Will be calculated as per chart dimensions and aggregate data accordingly.

Example sum.jpg

Not applicable
Author

I don't understand. Can you please explain what this means -

=Sum(Sales)  -  will be pre calculated as per your selections.

Sum(Sales)    - Will be calculated as per chart dimensions and aggregate data accordingly.

chiru_thota
Specialist
Specialist

=Sum(Sales)  -  will be pre calculated as per your selections.


Data will be aggregated irrespective of your chart dimension.see screenshot

( It aggregated sales for all countries 900)

Sum(Sales)    - Will be calculated as per chart dimensions and aggregate data accordingly.


  This one is same as writing expression directly in chart.No difference.


Example sum.jpg

simondachstr
Luminary Alumni
Luminary Alumni

Sum(Sales) calculates the sum per row,

=Sum(Sales) is static and calculates the sum of all rows and displays that same result in each row.

swuehl
MVP
MVP

its_anandrjs

Hi,

=SUM(Sales)  if you use this sum script in a chart and a variable it will calculates the sum of each row and display it,

and in variable if you use like

Eg:- Let vSales = SUM(Sales) in this script the value of sales is sum and store in the variable and you can use it in charts also.

SUM(Sales) It is a static script if you use it in and variable it will not sum the value of the Sales in each row but if you use it any chart it will calculates the sum in each row of sales. In variable if you use like

Eg:- Let vSales ='SUM(Sales)'

Hope this helps

Thanks & Regards