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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
paulcalvet
Partner - Specialist
Partner - Specialist

Put a measure value into a number variable

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 !

paulcalvet_0-1705671584653.png

The output is always 0, I try to convert, replace space by "", multiply by one, etc.. 

Here is the log : in text it works

paulcalvet_0-1705672632618.png

In number it doesn't work :

paulcalvet_1-1705672662083.png

Please help I don't find the solution !

You can find attached the automation.

Regards,

Paul

Labels (1)
16 Replies
paulcalvet
Partner - Specialist
Partner - Specialist
Author

Yes @AfeefaTk  I need help, put a measure in a variable doesn't work if the measure is formated. I try many solutions but nothing works.

Regards,

Paul

AfeefaTk
Support
Support

Hi @paulcalvet 

I am not sure how to create a formatted measure value for a measure in the UI. I have added the value in the expression field, but the Get Measure Value doesn't return the value.

Do you have an example app that has formatted measure?

Regards

paulcalvet
Partner - Specialist
Partner - Specialist
Author

hello @AfeefaTk, just set a format to the measure :

paulcalvet_0-1707206182401.png

 

AfeefaTk
Support
Support

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

cotiso_hanganu
Partner - Creator III
Partner - Creator III

Some 1.5 years ago, Qlik Support confirmed that for variables edited in interface, the change was not captured in Qlik Automation. After a while it seemed they solved this, but I understand it's not yet really mature...

cotiso_hanganu
Partner - Creator III
Partner - Creator III

Dual formated values can play tricks also to set analysis some times, so it's not quite a surprise the identified issue...
From the similar issues encountered in Set Analysis.... I would recommend to have dedicated variable that is behind the scene with formula connected to the front facing variable input, should be safer.

paulcalvet
Partner - Specialist
Partner - Specialist
Author

Hello,

Thank you it works with your custom code.

Regards,

Paul