Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
williamandersson
Partner - Contributor III
Partner - Contributor III

Can CSS Styling Multi KPI be used with a Variable?

Hi!

Can you use the Multi-KPI and in some way input the code through a variable? I like the function, but it is a bit tedious to code in that window / copy and paste your code here.

 

 

Labels (2)
1 Solution

Accepted Solutions
williamandersson
Partner - Contributor III
Partner - Contributor III
Author

Sorry for me being inactive in this case and not replying. I did not unfortunately find a solution to this, seems that you can not use variables for styling with the Multi-KPI box.

View solution in original post

8 Replies
Frank_S
Support
Support

Hi @williamandersson 

It is not exactly clear what you are asking here.

As such, I will offer two links:

 

1. Qlik Multi-KPI - When to use, how to create and multi-kpi visualization limitations

2. Qlik training - How do I configure a Visualization Bundle Multi KPI chart

 

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
williamandersson
Partner - Contributor III
Partner - Contributor III
Author

Hi!

Sorry, what I'm referring to is the Styling-box here. It would be so helpful if you could in someway store the code in a file/variable rather than writing it here.

williamandersson_0-1678778440489.png

 

PeterPeter
Contributor II
Contributor II

im experiencing the exact same problem. I have not yet figured out how to use a variable here

MartW
Partner - Specialist
Partner - Specialist

as far as I know this is not possible to add a variable with this.

it is not an Qlik formula or qlik box so to speak but it is a plain text box

the style textbox is 'missing' the highlighted part

MartW_0-1678896347207.png

 

 

williamandersson
Partner - Contributor III
Partner - Contributor III
Author

Sorry for me being inactive in this case and not replying. I did not unfortunately find a solution to this, seems that you can not use variables for styling with the Multi-KPI box.

MartW
Partner - Specialist
Partner - Specialist

@williamandersson true,
try a 3rd party extension. I found that if you use the Vizlib sheet menu plus extension (see the Vizlib website) you can add variables to that. the vizlib Sheet menu plus does have other features but 1 that is in commen with multi KPI is that you can add CSS. but with the sheet menu plus you have an option to add Qlik variables to this and this will work

Yuan
Contributor
Contributor

hi,现在翻译这么方便我就直接用中文回复了,我这里有一个可能只适用于简单场景的方案:你可以尝试用一个容器存放多个Multi KPI,通过变量决定展现其中的哪一个,此时该被展现KPI插件中写入的css将会生效,我用这个方式实现了用户点击按钮,切换表格表头的背景颜色。如果复杂点场景可能此方式并不适用。

garou
Contributor
Contributor

well actually you don't need an extension or theme for this.

you may use a container object for this.

1- you have to create 2 Multi KPI objects. one with css one without css

2- you have to drop this Multi KPI objects to container. 

3- after that you have to insert two button objects and select the actions to "set variable value".

4- first button to change variable value to 1 and second one to change variable to 0.

5- go to container , select Multi KPI with css code , in Show Condition section type $(whatever you named your variable)=1 then select the Multi KPI without css code and type to Show Condition $(whatever you named your variable)=0

whit this method you will have a sheet with button triggered css code.