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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
jessica_webb
Creator III
Creator III

Variable in dual expression

Help needed!

I have a bar chart with one dimension and three expressions.

I would like each bar to display the calculated value, as well as an associated string value.

Something like the (very poorly) doctored image below.

QV eg.PNG

At the moment, I have the following expression for the first bar:

=dual(SUM({<[New location]={'CHA'}>}AGGR(SUM({<[New location]={'CHA'}>}[Total score]),ID,Type))/

SUM({<[New location]={'CHA'}>}AGGR(SUM({<[New location]={'CHA'}>}[Total size]),ID,Type))+0.00000001

& '

   ' & $(vSL) ,

SUM({<[New location]={'CHA'}>}AGGR(SUM({<[New location]=>}[Total Score]),ID,Type))/

SUM({<[New location]=>}AGGR(SUM({<[New location]=>}[Total size]),ID,Type))+0.00000001)

I am confident that the expression itself works for the bar (highlighted red).

And the expression in the variable works when I copy it into a text box.

But as soon as I put the two together, it ignores the variable.

I have tried replacing the variable with a piece of text, just to see what would happen, but it still doesn't show.

Any suggestions appreciated!

1 Solution

Accepted Solutions
sunny_talwar

Have you made sure that you have set your formatting to 'Expression Default' on the number's tab?

Also, you might want to use Num() function to format the first part of your expression so that it is formatted the way you expect it to see

View solution in original post

2 Replies
sunny_talwar

Have you made sure that you have set your formatting to 'Expression Default' on the number's tab?

Also, you might want to use Num() function to format the first part of your expression so that it is formatted the way you expect it to see

jessica_webb
Creator III
Creator III
Author

Sunny T, you are an absolute genius! (And I am very stupid )

Yes, that was exactly the problem - I hadn't formatted it correctly...

Thank you so, so much for responding!