Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Column() function in calculated color expression

Hi all,

i have a simple gauge chart, it's a colored square that i need to decide the color based on the value of expression.

But i don't want to use the same expression in calculated color expression, becuse in my project it's really long and i need to repeat it many times, so i use the column() function.

(you can see the configuration in pics or check the qvw file.)

But it looks like that Column function dosn't work here.

I will appreciate any idea.

Best Regards - Peyman

05.png

6 Replies
Highlighted
Champion III
Champion III

Re: Column() function in calculated color expression

If you don't want to copy the full expression of the column 1, you can create a variable, and define it as the text of your expression.  Do not use "=" in variable definition, it will return the result rather than expression text.  Use this variable in color expression.

Regards,

Michael

Highlighted
Creator III
Creator III

Re: Column() function in calculated color expression

Thank you Michael for answer,

but i have about 100 so squares and this means that i need to defiene 100 another variables for colors.

But when i can use Column function that means i need to defein the color variable only one time.

Best Regards - Peyman

Highlighted
Champion III
Champion III

Re: Column() function in calculated color expression

Peyman,

I'm not sure what you're trying to do, sorry.  I was going to ask how come you have multiple expressions for one column - but there is no "column" in gauge charts.  It is relevant for staright or pivot tables.  Your attached example is not very helpful either.  The only I can see that you're expecting to refer to a table box from the gauge chart, and it doesn't work this way.  The color is red if you use expression sum(a) for color.

Probably you have to use expressions as is, no matter how complex they are.  Variables for expressions (or parts of expressions) will be helpful, I think.

Regards,

Michael

Highlighted
Creator III
Creator III

Re: Column() function in calculated color expression

Thx Michael,

the idea is to build a management dashboard with many squares that each shows a KPI. The following picture can be helpful to catch the main principle.

StockTouch-2.jpg

(picture: StockTouch ios app.)

and user can get more information with clicking on every square.

At the moment i have to repeat the expression for color calculation process, as you mentioned.

I thought it can be better if i can find any approach that allows me to use the calculated value of KPI, as we use the column function in pivot and straight tables.

You know it's a grate performance hack and can reduce the total calculation time of chart. Also it makes the development process easier because i don't have to repeat the big expression that calculate some 7 or 11 shades of colors for every KPI.

You are completely right about using vars and it's what makes me suffer less to produce this nice dashboard!

Best Regards - Peyman

Highlighted
Not applicable

Re: Column() function in calculated color expression

May I ask why you are using a gauge chart? I guess it will be more simple to get the colors right if you would use a straight table (chart), and dynamically change the background color of the expression. This way, you can label the expression and use this label in the calculation for the background color.

Highlighted
Creator III
Creator III

Re: Column() function in calculated color expression

as i said, i need to demonstrate many KPIs and every KPI is defined as a formula. with this structure I cant use a table to show the results. That means for every box i have a different expression.