Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I try to retrieve a measure value and store it into a variable.
It works with a string variable but not with a number !
The output is always 0, I try to convert, replace space by "", multiply by one, etc..
Here is the log : in text it works
In number it doesn't work :
Please help I don't find the solution !
You can find attached the automation.
Regards,
Paul
Hi @paulcalvet
So yes, I kind of got the issue and I can reproduce it.
I am not able to remove spaces using the existing formulas in QAA.
I tried with a custom code block to remove spaces in between the measure value, then set it as the value of the variable and it worked for me.
I am not sure if there is any other easy solution to achieve this.
For now, let me share the automation workspace that worked with custom code block.
Please let me know your feedback.
Regards
Afeefa TK
Hi, it looks like the measure has 2 numbers separated by an space, maybe that's the cause it can only interpreted as a string.
I've tested the automation with the ctrl+00 script and it works
Yes, it's certainly the format number.
But when I try to convert it or to remove space from string, it doesn't work.
I will try it with a measure without format, but It's a bad workaround to duplicate measure.
Hi, I tested but I didn't know either how to remove spaces in the text using the automation, but instead of duplicating the full expression you can create another expression that just removes spaces from the original measure, like creating a Non_space_Measure that has the expression:
PurgeChar(Original_Expression_Name, ' ')
At least if you change the expression formula you only need to update the original.
Or wait for someone with more knowledge than me about how to do the same in automations.
Formatting is useful for a human viewing but on a programmatic process it's the opposite of helpful ...
In this use case, I work in managed space so I can't create new measure, and I'm not in favour duplicate objects to manage number formating 🙂
Maybe a moderator can help ?
@Jeffrey_Goldberg do you know how we can use a measure in automation when this measure have a format ? in my case, the result is understood as a string.
Regards,
Paul
Hi @AfeefaTk it looks like theree is a variable with a number stored using an empty space as thousand separator, probably this causes to be readed as two diffrent values, which returns null(), and the possible solution would be to add an step in automation that removes the space or interprets the space as thousand separator so the value can be readed as a number.
Hi @rubenmarin
So you have a solution using automation?
Its working for you?
Or do you need any help here?
Regards
Hi @AfeefaTk, thanks for your quick answer... I was just summaryzing the thread. @paulcalvet is the one that needs the solution. Let's wait to confirm if @paulcalvet has a solution or still needs help.