Skip to main content

New to Qlik Sense

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

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
ElsKnockaert
Contributor III
Contributor III

Set Analysis - Combine two values for one set modifier

Hello everyone

I'm trying to write a set analysis where I only get the sum from those ND_Presence fields where the ND_Year_Month is equal to the year of ND_Test, space, month of ND_Test.

ElsKnockaert_0-1616680742937.png

 

I've tried multiple syntaxes, but can't seem to make it work in a set analysis

sum( {< ND_Year_Month = {"=$(=year(ND_Test))"} &' '& {"=$(=month(ND_Test))"}}>} ND_Presence)

Thanks in advance!

Labels (3)
2 Solutions

Accepted Solutions
jwjackso
Specialist III
Specialist III

Try sum({<ND_Year_Month={"=$(=year(ND_Test)&' '&month(ND_Test))"}>}ND_Presence)

Also in the expression editor, verify the results of the equation at the bottom.  In my test, the month is in camel case.

cap1.png

View solution in original post

ElsKnockaert
Contributor III
Contributor III
Author

It works if I delete the after the opening double quotes! Thank you so much!

sum({<ND_Year_Month={"$(=year(today())&' '&month(today()))"}>}ND_Presence)

View solution in original post

2 Replies
jwjackso
Specialist III
Specialist III

Try sum({<ND_Year_Month={"=$(=year(ND_Test)&' '&month(ND_Test))"}>}ND_Presence)

Also in the expression editor, verify the results of the equation at the bottom.  In my test, the month is in camel case.

cap1.png

ElsKnockaert
Contributor III
Contributor III
Author

It works if I delete the after the opening double quotes! Thank you so much!

sum({<ND_Year_Month={"$(=year(today())&' '&month(today()))"}>}ND_Presence)