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

Set Analysis

To sum some values we use the following function: sum( Value )

Example:

sum( TotalSales )


But, what to do if you want just view the sales of 2014 ?


We can use the Set Analysis, then don't need make SQL script.


Using Set Analysis:


sum( {<Year = {'2014'}>}  TotalSales)

This will sum the TotalSales of 2014, without othes years

6 Replies
VishalWaghole
Specialist II
Specialist II

Hi Marcus,

What you want Exactly???

er_mohit
Master II
Master II

Try this

make a variable vMaxYear 

=max(Year)   //Expression for variable

then on expression side

SUM(Total {<Year={'$(vMaxYear)'}>} Sales)

or this one also

SUM({1} {<Year={'$(vMaxYear)'}>} Sales)

vikasmahajan

Dynamic

Sum({$< Year = {$(=Max(Year))}>} Sales )

vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
mvaugusto
Creator
Creator
Author

This is just a exemple for begginers.

Thanks.

vikasmahajan

See Dynamic Full .

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable

Thanks for this.

I'm trying to understand set analysis and your file is very helpfull.

I still don't make it with my proper file...

I can see your formulas but there is no numbers. For instance sum (...) match, but sum ( {$} ... ) don't.

My question is :

Can my QV version be too old to set analysis? (QV 8.2)