Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

Strange $ Expansion Results/With double '=' compare to one '='

Hi,

why count({<Day={"$(=Max(Day))"}>} Day) is not equal to write:

count({<Day={"=$(=Max(Day))"}>} Day)?

I get different returns. But according to Syntax I got no errors. I browsed all the Qlik  Help Site about Dollar Expansion variants. The additional '=' was never mentioned in the examples. 

Thanks to your help!

 

2 Solutions

Accepted Solutions
Taoufiq_Zarra

Hi @Applicable88 

I don't know, if semantically correct.
but if you just look at the syntax, the reason for having two results is that the second one doesn't take the value in {} , no error but simply ignored.

look at these three examples

Capture.JPG
the first with

count({<Day={"$(=Max(Day))"}>} Day)

the second with

count({<Day={"=$(=Max(Day))"}>} Day)
and the third one without analysis set

count( Day)


and you notice that for the second one, it's like the set analysis {} doesn't exist.

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

tresesco
MVP
MVP

{<Day={"$(=Max(Day))"}

- For this, as you rightly understand the maximum Day, i.e. one day out of the entire set of days in the scope would be considered.

{<Day={"=$(=Max(Day))"}>}

- For this, as you would usually don't want the maximum Day for every individual days would be considered. That is effectively all the days would be taken into consideration. And that is because, when your set analysis search string begins with an '=', the qlik engine works in the line of advanced search   for the dimension. 

That is how they are different.

View solution in original post

2 Replies
Taoufiq_Zarra

Hi @Applicable88 

I don't know, if semantically correct.
but if you just look at the syntax, the reason for having two results is that the second one doesn't take the value in {} , no error but simply ignored.

look at these three examples

Capture.JPG
the first with

count({<Day={"$(=Max(Day))"}>} Day)

the second with

count({<Day={"=$(=Max(Day))"}>} Day)
and the third one without analysis set

count( Day)


and you notice that for the second one, it's like the set analysis {} doesn't exist.

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
tresesco
MVP
MVP

{<Day={"$(=Max(Day))"}

- For this, as you rightly understand the maximum Day, i.e. one day out of the entire set of days in the scope would be considered.

{<Day={"=$(=Max(Day))"}>}

- For this, as you would usually don't want the maximum Day for every individual days would be considered. That is effectively all the days would be taken into consideration. And that is because, when your set analysis search string begins with an '=', the qlik engine works in the line of advanced search   for the dimension. 

That is how they are different.