Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. 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)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sushil353
Master II
Master II

Try with this one

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