Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
drewjamison1396
Partner - Contributor II
Partner - Contributor II

Field of expressions

I am trying to create a visualization(bar chart) that runs off of a field that's values are different expressions.  Also I would like the filter pane to allow me to change which expression is being used.

1 Solution

Accepted Solutions
drewjamison1396
Partner - Contributor II
Partner - Contributor II
Author

Thank you for the help. I came across the solution of just having the expression $(=calculation) 

View solution in original post

2 Replies
salonicdk28
Creator II
Creator II

Hi,

You need to add inline table in the script like 

Load* Inline [
Metric
Margin
Cost
Sales
];

then add the below expression in the bar chart as 

=If(Metric='Cost', Sum(Cost),if(Metric='Sales', sum(Amount),if(Metric='Margin', sum(Amount)- Sum(Cost)))

and place the formula in else condition if you want to show anything as default without selecting any filter  

drewjamison1396
Partner - Contributor II
Partner - Contributor II
Author

Thank you for the help. I came across the solution of just having the expression $(=calculation)