Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 :
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
Sorry, parameters with commas won't work.
Sad, thanks anyway !
you can work around the comas as below
count({<attachement_etat = {('Analysé (conforme)'|'Réfaction proposee')}>
*
<prediction_score = {">=$(vSliderScorePrediction)"} >} attachement_id)
I'm ok with working around with sets but I can't see how to get the "|" character to work because I have an error :
my bad, try below
count({<attachement_etat = {"(Analysé (conforme)|Réfaction proposee)"}>
*
<prediction_score = {">=$(vSliderScorePrediction)"} >} attachement_id)
This solution partially works. The measure does not take the filter into account if there is a space in the value or a parenthesis. I can replace that with a '*' but it's not very reliable....
try adding single quotes around the strings, this is basically advanced search and should work
count({<attachement_etat = {"('Analysé (conforme)'|'Réfaction proposee')"}>
*
<prediction_score = {">=$(vSliderScorePrediction)"} >} attachement_id)
This time it does not work at all, I have 0 in result ....
lets try wildcards
count({<attachement_etat = {"(Analysé*conforme*|Réfaction*proposee)"}>
*
<prediction_score = {">=$(vSliderScorePrediction)"} >} attachement_id)