Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using built in functions within set analysis


Hi,

I have been tring to get the metric value for the current year and month being current month-1.

Below is the expression that i have used to acheive the same.But i am not getting any valid results

  =only({$<My_Year={'=$(=year(today())'},
My_Month={'=$(=Month(AddMonths(today(),-1))'}>}Value)

Can anyone let me know where i have gone wrong

 

1 Solution

Accepted Solutions
tresesco
MVP
MVP


PFA,

It was parenthesis issue.

View solution in original post

6 Replies
tresesco
MVP
MVP

Two things come in mind:

1. If there are  more than one values for Value for current year previous month, ONLY() would return NULL

2. My_Month format may not be matching.

jagan
Partner - Champion III
Partner - Champion III

Hi,

If there are multiple values for Value dimension then you will get a null value, check this.  If there are multiple values then try using any max, min, sum functions.

Also make sure that My_Month and =Month(AddMonths(today(),-1)) are in the same format.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

I did try with sum even then i am getting Null as the result.I have attached thae sample application too so please have a look and let me know where i have gone wrong

tresesco
MVP
MVP

Attachment?

Not applicable
Author

Thanks & Regards,

Anushree Shetty

tresesco
MVP
MVP


PFA,

It was parenthesis issue.