Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mbespartochnyy
Creator III
Creator III

MonthName Value In Set Analysis

Hi everyone,

I'm having really tough time finding the right value to put in set analysis that would sum up a field by a month name. Attached is a sample data set and an app two text boxes - one is using sum of Count field for month of June 2018 expression and the other is using sum of Count field for date of June 7th, 2018. The box that uses Date field calculates the sum correctly, but the box that uses Month field in set analysis is not.

I'm using the following expression in Set Analysis with Month field:

=Sum({<Month = {'Jun 2018'}>} Count)

It's always returning 0. Does anyone know why that's not working and how to adjust it to have the expression return correct sum?

Thanks,

Mikhail B.

1 Solution

Accepted Solutions
mbespartochnyy
Creator III
Creator III
Author

It looks like it's a QV bug. I tried uninstalling v 12.20.20600.0 and reinstalling it again and got the same results. I then installed an older version (v 12.10.20600.0) and it worked fine:

MonthNameSample v12.10.PNG

Also, here are some reference posts that add content behind the issue and the fix:

 

https://community.qlik.com/blogs/qlikviewdesignblog/2017/09/11/quotes-in-set-analysis

and

https://community.qlik.com/thread/268274

It looks like in v12.20.20600.0, the issue may have been fixed so using double quote instead of single quote would do the trick. Changing the expression to the one below worked for me in v12.20.20600.0:

=Sum({<Month = {"Jun 2018"}>} Count)

Credit to Sunny for helping me find the fix and for sharing HIC's blog post.

Hopefully, this will help others who also ran into this issue. It helped me wrap my mind around the difference between single and double quotes in set analysis and what was going on between the two different versions.

Mikhail B.

View solution in original post

7 Replies
trdandamudi
Master II
Master II

Both text boxes are showing as 1 and which is correct based on the source data. What are you expecting as a output for each of that text boxes ?

mbespartochnyy
Creator III
Creator III
Author

The top text box is showing 0 for me:

MonthNameSample.PNG

Mikhail B.

trdandamudi
Master II
Master II

It is showing as below on my side:

Close the qlikview and reopen it and see if that works ?

sunny_talwar

I am seeing 1

Capture.PNG

mbespartochnyy
Creator III
Creator III
Author

That's so strange. I'll try reinstalling QV. Maybe that's the issue. I'm running November 2015 SR5, version 12.20.20600.0.

I'll see if reinstalling or downgrading will help.

Mikhail B.

mbespartochnyy
Creator III
Creator III
Author

It looks like it's a QV bug. I tried uninstalling v 12.20.20600.0 and reinstalling it again and got the same results. I then installed an older version (v 12.10.20600.0) and it worked fine:

MonthNameSample v12.10.PNG

Also, here are some reference posts that add content behind the issue and the fix:

 

https://community.qlik.com/blogs/qlikviewdesignblog/2017/09/11/quotes-in-set-analysis

and

https://community.qlik.com/thread/268274

It looks like in v12.20.20600.0, the issue may have been fixed so using double quote instead of single quote would do the trick. Changing the expression to the one below worked for me in v12.20.20600.0:

=Sum({<Month = {"Jun 2018"}>} Count)

Credit to Sunny for helping me find the fix and for sharing HIC's blog post.

Hopefully, this will help others who also ran into this issue. It helped me wrap my mind around the difference between single and double quotes in set analysis and what was going on between the two different versions.

Mikhail B.

trdandamudi
Master II
Master II

Good to know. I am also using version 12.10 on my side.