8 Replies Latest reply: Apr 30, 2014 3:17 AM by anbu cheliyan

# 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

• ###### Re: total count based on field value

Write like

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

• ###### Re: total count based on field value

not clear,

can you give an example like

Table A has field YEAR,

the expression should return count of values where year = 2014

• ###### Re: total count based on field value

Ex:-

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

• ###### Re: total count based on field value

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

• ###### Re: total count based on field value

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

• ###### Re: total count based on field value

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

• ###### Re: total count based on field value

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

• ###### Re: total count based on field value

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