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: 
Anonymous
Not applicable

ytd formula picking up ytd results

Hi,

I have the following formula that is not picking up the Financial Year Total results.  I know its in the syntax but cant see it.  where am I wrong please:-

Let vCurrentfYear = 2017;

If(Contact <> '', Count({'$Year={vCurrentfYear'} Type))

Cheers,

Laura

1 Solution

Accepted Solutions
sushil353
Master II
Master II

if you are using variable .. then in that case the value will change according to the selection.

I hope you have create the variable some thing like =Max(MonthYear)

View solution in original post

13 Replies
sushil353
Master II
Master II

Hi Laura,

Try this:  Count({<Year={'$(vCurrentfYear)'},Contact -={""}>} Type)

HTH

Sushil

Anonymous
Not applicable
Author

What Sushil shared, should work.

You can see this as well for better understanding?

Set Analysis for certain Point in Time

Set Analysis for Rolling Periods

Anonymous
Not applicable
Author

Hi Sushil,

I am getting a red error under the first squiggle bracket:-

 

-={" "}>} Type))

 

Anonymous
Not applicable
Author

thank-you!!!

sushil353
Master II
Master II

It will be ok.. as this -= is not recognized by qv.

Anonymous
Not applicable
Author

the only thing I don't like about the coding is the hard coded periods though

Anonymous
Not applicable
Author

but it returns '0' in results

Anil_Babu_Samineni

How about this

Aggr(Count({<Year={'$(vCurrentfYear)'}>} Type), -Contact)

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sushil353
Master II
Master II

Try with this one

If(not isnull(Contact),Count({<Year={'$(vCurrentfYear)'}>} Type))