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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

conditionally show expression values

I have expression resulting % values, I want to only show these values only>-500% and <500% , for all other values roll out values. I think,I should make it with condition expression but how should I make it for %?

7 Replies
Not applicable
Author

Can you attach your sample file. Depending on the results you either *100 or /100.

Say your result is 45.6 then to convert to percent you *100 = 4560%

Then a simple if() will do.

Not applicable
Author

Hi,

Well you can use an IF, something like this:

if($(vMyExpression) >-5 and $(vMyExpression) < 5,

      $(vMyExpression)

) // Use it in your expression

-5 = -500%

5= 500%

vMyExpression = your % formula

Best Regards.

Anonymous
Not applicable
Author

I made % values to show in chart Number tab, so it is automatically value *100.

In expression condition,

Capture.PNG

still I cant find desired results.  where  Act.@op is previous expression used here. Just to check values I have given 0,as I have now all values< 150%>2%

Not applicable
Author

Possible to attach a sample file?

Anonymous
Not applicable
Author

I found above will not be executed with the expression label in if statement. But it is either rolling out expression totally or showing all results. I want to display expression, however not following condition should be rolled out values.


Anonymous
Not applicable
Author

here is the sample file...

Anonymous
Not applicable
Author

try this for vs.OP%

=if([vs. OP YTD]/$(linPNLActualBalance_CY_YTD_BUD)<5 and [vs. OP YTD]/$(linPNLActualBalance_CY_YTD_BUD)>-5, [vs. OP YTD]/$(linPNLActualBalance_CY_YTD_BUD), 0)

and replicate it for other fields after verifying the conditions and tweaking the expression as necessary.