Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

brianrmacdonald
Contributor

Help with set expressions

I have a table of reports issued during the past 2 years or so.  I want to put a gauge in my sheet that shows the number of reports that have been produced for the current month.  Here is what I have tried...

Count({1<Month(report_complete_date) = {Month(Today)}>} peer_ID)

However the expression editor reports that there is an error in this function (and I also realize this will not give me the results I want yet, it will give me all reports produced in any July in my data...but it was where I started)

The expression editor likes this expression just fine.

Count({1<report_complete_date = {Today}>} peer_ID)

But this will only give me reports produced today...not what I want.


Is there some problem with using functions in set expressions?  How would I provide what I am looking for?


Thanks in advance.

1 Solution

Accepted Solutions
MVP
MVP

Re: Help with set expressions

There are only field names allowed on the left side of a field set modifier in a set expression.

Try to create a field in your script:

LOAD

     Month(report_complete_date) as report_complete_month,

     ...

Then you can use this field in the set modifier:

Count({1< report_complete_month = {$(=Month(Today()))} >} peer_ID)


Dates in Set Analysis

A Primer on Set Analysis

2 Replies
MVP
MVP

Re: Help with set expressions

There are only field names allowed on the left side of a field set modifier in a set expression.

Try to create a field in your script:

LOAD

     Month(report_complete_date) as report_complete_month,

     ...

Then you can use this field in the set modifier:

Count({1< report_complete_month = {$(=Month(Today()))} >} peer_ID)


Dates in Set Analysis

A Primer on Set Analysis

brianrmacdonald
Contributor

Re: Help with set expressions

Thank you.