Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression result based on value

Hi,

I would like to create an expression which the result would be dependent on max value.

For example:

if the max value of the expression would be 0.001, then multiply the value by 10 until the value reach 1 (in this case, multiply by 1000),

but if the max value would be 0.1, then only multiply by 10.

How can i do this in an expression without creating 10 if clauses?

Thank you,

Emílio

1 Solution

Accepted Solutions
Gysbert_Wassenaar

0.001 * pow(10, -floor(log10(0.001))) = 1. Replace 0.001 with the expression that returns the value you want multiplied.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

0.001 * pow(10, -floor(log10(0.001))) = 1. Replace 0.001 with the expression that returns the value you want multiplied.


talk is cheap, supply exceeds demand
Not applicable
Author

Thks ,

Regards,

Emílio