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

understanding when to use < or } in formula, qlikview

Hi,

I need to pick up all transactions within the current Financial Year that are not blank.  i have the following formula but it is not working (no error just zero shows up).  A little red line shows up under the "}" after FiscalYear.

if(ContactOptions <> '',Count({<%DateEmpFormAdded = FiscalYear>}) EngagementType)

Any assistance appreciated.

Also can anyone direct me to a youtube or page where it explains the use of the following characters in a formula?

}

]

,

etc....

1 Solution

Accepted Solutions
sunny_talwar

20 Replies
sunny_talwar

This is a good pdf file to learn about set analysis syntax.

Also some other good links:

A Primer on Set Analysis

http://tools.qlikblog.at/SetAnalysisWizard/QlikView-SetAnalysis_Wizard_and_Generator.aspx?sa=_CNGH

Anonymous
Not applicable
Author

thanks Sunny.

for "today",  i can write today().  is there the same for month?

robert_mika
Master III
Master III

No.

Today is a function on itself

Today() will be always ..today.

Month needs an argument.

to example

Month(Today)  will return May

Anonymous
Not applicable
Author

thanks Robert,

ok, so that is what i used here.  I dont understand where i am going wrong then?  i dont recive and error but no data displays.  you cant see it here but in the Expression the Date{ is underlined in Red

if(ContactOptions <> '',Count( {$<Date{"%DateEmpFormAdded = Month(Today())"}>} EngagementType))

jonathandienst
Partner - Champion III
Partner - Champion III

If(ContactOptions <> '', Count({$<%DateEmpFormAdded = {"$(=Month(Today()))"}>} EngagementType)

Simple SA syntax:

Outer { } - delimits the entire set analysis clause

$ - the set on which to operate - $ means current selections and can be omitted

< > - the qualifier for the set

field = {...} - the qualifier expression, the LHS is field name only, the RHS is a list of possible values (with single quotes) or a search term (with double quotes). You can have multiple expressions, separated by commas.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

thank-you Jonathan.

i do not recieve any results back nor an error.  i think it may have something to do with date format?

So what i tried was adding a variable:-

//LET vMonth_Current = Month(Today(),'MM');   

i reran teh script and it wouldnt even reload the data.

robert_mika
Master III
Master III

What format has your

DateEmpFormAdde


dimension?

Could you post a sample?

Anonymous
Not applicable
Author


EngagementType%DateEmpFormAddedFiscalMonthYearFiscalMonthNumberDateEmpMonth
Career20/10/2015Oct-20154Oct
Career23/10/2015Oct-20154Oct
PrashantSangle

Hi,

How do you calculate Fiscal Year?

When you compare from Fiscal Year start to today with date. Then you need provide range in set analysis.

Try like

If(ContactOptions <> '', Count({$<%DateEmpFormAdded = {">=01/04/2016<=$(=Date(Today()))"}>} EngagementType)


Since above expression is hard coded for Fiscal Year Start date you can make it dynamic also.


Kind Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂