6 Replies Latest reply: Oct 31, 2017 11:51 AM by omar bensalem

# Simple question "Count"

Sorry for this simple question, but there are my first steps in Sense

I'm tring to represent a graphic whit a cumulative date (dimension)  by data, I have a table whit a colum "Risk" and inside two possible values, 0 and 1

I only want to count  each value = 1 and Value =0

I try whit   Count(IF([Tipo Risk<1,1,0))  but does not work

Can you help me?

• ###### Re: Simple question "Count"

as an expression : count({<Risk={1}>}yourmeasure)

and

another one:

count({<Risk={0}>}yourmeasure)

if you want cumulative by date: change your expression as follow: (make sure to sort by date; in the sort tab, put the date above the 2 expressions):

rangesum(above( count({<Risk={1}>}yourmeasure) ,0,rowno()))

rangesum(above( count({<Risk={0}>}yourmeasure) ,0,rowno()))

• ###### Re: Simple question "Count"

with the last expressions; in each date, it will calculate the count of risk=1 for that date and all the previous counts for the previous dates

• ###### Re: Simple question "Count"

Works

Thanks ++

• ###### Re: Simple question "Count"

If your question has been asnwered, please close the thread by marking the correct answer as so

• ###### Re: Simple question "Count"

Hi Marcos,

Set analysis may be a better fit here.

Count({<Risk={1}>}Data)

and

Count({<Risk={0}>}Data)

Cheers,

Simon

• ###### Re: Simple question "Count"

Works, thanks