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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Set Analysis using <=

Hello All,

I am having an issue using the following stmt: sum({<FISYR <= {$(vFisYr)}, RTDFlag = {1}>} [R&M]). It's just not working. Help.

Thanks

I know it's a syntax issue, but just cant find it.

1 Solution

Accepted Solutions
Not applicable

Hi there,

The correct syntax would be:

sum({<FISYR = {"<=$(vFisYr)"}, RTDFlag = {1}>} [R&M]).

Regards

View solution in original post

5 Replies
Not applicable

Hi there,

The correct syntax would be:

sum({<FISYR = {"<=$(vFisYr)"}, RTDFlag = {1}>} [R&M]).

Regards

tmumaw
Specialist II
Specialist II
Author

thanks....perfect. this one seems to work, but just want to be sure on the syntax.

sum({<FISYR = {$(vFisYr)}, [Installed in Cost Ct_ZINSTALLED] = {X}, MTDFlag = {1}>} [R&M])

tmumaw
Specialist II
Specialist II
Author

Need some help with Set Analysis. I don't want the user to have to enter a fiscal year, so here is what I put together, however it does not work the way I thought it should.

sum({<FISYR = {$(vFisYr)}, MTDFlag = {1}>} [Total Costs])

My $(vFisYr) should be equal to 2010, however it returns everything and makes the user enter the FISYR. Thanks

Not applicable

Hi Thom, I dont know if understood correctly, but if you want the set analysis working even if the user hasn't selected a Fiscal Year, then you can use the max function to select the always the maximum year available, like this:

sum({<FISYR = {$(=max(FISYR))}, MTDFlag = {1}>} [Total Costs])

Regards

tmumaw
Specialist II
Specialist II
Author

Ivan,

Thanks....That is exactly what I was looking for. I was in Chicago at Q-Days and took the set analysis class, but it was like a "Firehose" class. Everything was thrown at you so fast it will take some time to sink-in.

Thom