Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

total count based on field value

I have table with which have a date.

I want to get the total from this table where the date belong to some year.

example get total for year 2014,

I want to use this expression

1 Solution

Accepted Solutions
its_anandrjs

Ex:-

Load  * inline[

Year,Sales

2011,100

2012,150

2012,200

2014,400

2014,500

];

If you write expression :- Sum({< Year ={'2014'} >} TOTAL Sales)

Then you get line items of 2014 that is 900

View solution in original post

8 Replies
its_anandrjs

Write like

Sum({< Year ={'2014'} >} TOTAL value)

Not applicable
Author

not clear,

can you give an example like

Table A has field YEAR, 

the expression should return count of values where year = 2014

MK_QSL
MVP
MVP

Try Below Three... Any one should work;

SUM(Value)

SUM(Total Value)

SUM(Total <Year>Value)

Take Year and Dimension in Straight Table

And expression 1 or 3

its_anandrjs

Ex:-

Load  * inline[

Year,Sales

2011,100

2012,150

2012,200

2014,400

2014,500

];

If you write expression :- Sum({< Year ={'2014'} >} TOTAL Sales)

Then you get line items of 2014 that is 900

Not applicable
Author

SUM(Value), what value means

should I write SUM(2014)? if so it gives 2014

Can you give me a real example with Table A has field YEAR to get total count where YEAR = 2014

MK_QSL
MVP
MVP

SUM of Value means SUM(SalesPrice) or SUM(CostPrice) etc...

Not applicable
Author

Will this will give sum of values for field Sales Price,

What I want is to the total records in table A where Sales Price = 1

anbu1984
Master III
Master III

Count({< Year ={'2014'},Sales_Price={'1'}>} Sales_Price)