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

Expression help -- sum based on 2 criterias

I want to make a dashboard page that reference the current month always.  I created a table with the header labeled 'Cur Mth' and one row member 'Feb'.  I have the data table with titles Month, Year, Account, Actual Am2.

sum({$<Year={2016}>,Month={$(Cur Mth)}},[Actual Amt2])

It says the expression is correct, but I am not getting any data.

If  i use just the year, it works.  sum({$<Year={2016}>}[Actual Amt2])

I can't get adding the 2nd criteria to work.  Any suggestions.

What was simple in excel is driving me nuts here.

13 Replies
imrencimen
Contributor III
Contributor III

pls send qvw file

oknotsen
Master III
Master III

This is about Qlik Sense. Sense does not work with QVW files, but used QVF files (or files without an extension if hosted on the server) instead.

May you live in interesting times!
swuehl
MVP
MVP

Peggy Wells wrote:

It didn't work.  Any other suggestions???

Maybe. But could you please detail on what exactely didn't work and how your data looks like?

Note that Only() only returns a value if there is only one possible value in the aggregations record set for the expression.

(So if your Cur Mth table contains multiple records, this may not work)

Also, you can check the set expression with all dollar sign expansions expanded by leaving the expression label empty, then examine the expression header in e.g. a straight table, which will show the expression instead of a label.

Does it show a set modifier with the expected value 'Feb'?

Hope this helps,

Stefan

Anonymous
Not applicable
Author

This helped!  Late, but wanted to say thank you!!!