Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
brianrmacdonald
Creator
Creator

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
swuehl
MVP
MVP

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

View solution in original post

2 Replies
swuehl
MVP
MVP

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
Creator
Creator
Author

Thank you.