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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
lukas_
Contributor III
Contributor III

Using a measure with set analysis in a variable

Hi,

 

I have difficulties with the insertion of a measure with a set analysis in a measure.

I have a function to format the display of my digits when I associate it with a dual.

 

SET vScaleNumber=If($1> 1000000000,num($1/1000000000, '####,0Mds €')
  ,If($1> 1000000,  num($1/1000000, '####,0M €')
  ,If($1> 1000,  num($1/1000, '####,0K €')
  ,money($1, '####,0 €')
)))

 

 The measure is as follows :

 

dual($(vScaleNumber(
count({<attachement_etat = {'Analysé (conforme)','Réfaction proposee'},prediction_score = {">=$(vSliderScorePrediction)"} >} attachement_id))),
count({<attachement_etat = {'Analysé (conforme)','Réfaction proposee'},prediction_score = {">=$(vSliderScorePrediction)"} >} attachement_id))
)

 

The problem is that when I insert my measure in the function and there is a set analysis with several elements and therefore separated by a comma, my function crashes because it identifies the following as another parameter of the function :

lukas__0-1652714790228.png

I've tried surrounding my count() with $(=) except that's going to calculate the value for me as a whole, so I won't be able to associate it with a dimension.

 

Do you have any idea how to make this work?

 

Thanks

 

Labels (4)
10 Replies
lukas_
Contributor III
Contributor III
Author

As I said above, it works by replacing spaces and parentheses with asterisks but it's not really data-safe in my opinion.

Anyway, thank you for looking for a solution to this problem! 😉