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

How to find the total of my current selection year

Dear friends,

   How can I find the total of sale value in a current selection of year

Eg:

Sales of value in 2003 incase if I change the year into 2004 it will automatically change itself

Pls send it an expression

1 Solution

Accepted Solutions
PrashantSangle

Hi,

You can also write like

Sum({<Year={"$(=max(Year))"}>}[Sale Value])

By default it will give you result for max(Year) else it will give on selection.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

8 Replies
robert_mika
Master III
Master III

Could you give more details about your data set?

Not applicable
Author

I have detail like as below

year           salesvalue

2001            4563878.12

2003             78945.123

2005             789456

.2002            5487961.32

2001             896564.2

2003            4565832.1

2005            54879386.1

And I need total no of sales value for a particular year. if I select 2001 means it will reply the total of sales value from 2001 if I click 2003 means It returns total value of 2003

That's is it . I need this result in an expression...

Not applicable
Author

And more over I used this simple exp.

        =sum([Sale value])

It perform correctly but i want to know there is  any other exp available for this scenario to make it more efficiently tat y am asking.......

robert_mika
Master III
Master III

sum(salesvalue) should work

2015-04-23 06_20_44-QlikView Personal Edition - [C__Users_Katarzyna_Desktop_161310.qvw_].png

PrashantSangle

Hi,

You can also write like

Sum({<Year={"$(=max(Year))"}>}[Sale Value])

By default it will give you result for max(Year) else it will give on selection.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
robert_mika
Master III
Master III

'KISS' is the best way..;)

(google KISS)

Not applicable
Author

Max I got my expected expression thank you very much

Not applicable
Author

Robert u r very helpful to me and am surfing the word 'KISS' in google it  give me lot of ideas thank you